<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SIMD on Tom's Lab Notes</title><link>https://vtbl.dev/tags/simd/</link><description>Recent content in SIMD on Tom's Lab Notes</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Wed, 17 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://vtbl.dev/tags/simd/index.xml" rel="self" type="application/rss+xml"/><item><title>SIMD Algorithm Design: Beyond Basic Vectorization</title><link>https://vtbl.dev/posts/simd-algorithm-design/</link><pubDate>Wed, 17 Sep 2025 00:00:00 +0000</pubDate><guid>https://vtbl.dev/posts/simd-algorithm-design/</guid><description>&lt;p>In this post I will improve the performance of an algorithm that converts RGB888 images to RGB565.
It is divided into different sections:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>First, I will give a brief introduction on RGB888 RGB565 and converting between the two, and present a scalar algorithm
that achieves this task.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Next, I will use SIMD Neon instructions to attempt to manually &amp;lsquo;optimize&amp;rsquo; this algorithm.
I will also introduce an optimized version that uses special SIMD instructions and a slightly different approach
to improve the theoretical throughput of the algorithm even further.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Finally, I will present the benchmarking results and compare different versions against each other.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The post will end with a conclusion and a couple of final words.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>Any benchmarks are conducted on a MacBook with an M3 Pro CPU with 10 cores, though the code
is single threaded.
Code is compiled in C23 mode with -O3 (unless stated otherwise).&lt;/p>
&lt;p>Benchmarks are ran on 200x200 RGB888 images since I had those on hand from a different project.
Note that the performance difference will be marginal in absolute numbers. Partially because of the
performant underlying hardware and partially because of the image size of course.&lt;/p>
&lt;p>Any performance improvements are to be seen relatively to what they are compared to, since these conclusions
similarly apply to bigger problems where the timescale might not be in the $\mu$s range.&lt;/p>
&lt;h1 id="introduction">Introduction
&lt;/h1>&lt;h2 id="what-is-simd">What is SIMD?
&lt;/h2>&lt;p>&amp;lsquo;Single Instruction Multiple Data&amp;rsquo; (SIMD) can be used to improve the performance
of algorithms that require the same transformations on a wide range of data.
This is achieved by increasing data throughput for every instruction
(operating on up to 512 bit &amp;lsquo;vectors&amp;rsquo; instead of traditional 64 bit registers).&lt;/p>
&lt;h2 id="transforming-rgb888-to-rgb565">Transforming RGB888 to RGB565
&lt;/h2>&lt;p>Transforming 24 bit RGB (8 bits per color channel) into 16 bit RGB effectively means cramming the information contained
in 8 bits into 5 or 6 bits and then putting these pixels into a 16 bit value.&lt;/p>
&lt;p>There are different approaches to achieve this.
The first and most simple one is to just truncate the last 2 or 3 bits.&lt;/p>
&lt;p>Taking 3 bit truncation as an example, values would be mapped as follows:&lt;/p>
&lt;blockquote>
&lt;p>0-7 -&amp;gt; 0&lt;br>
8-15 -&amp;gt; 1&lt;br>
16-23 -&amp;gt; 2&lt;br>
&amp;hellip;&lt;/p>&lt;/blockquote>
&lt;p>When truncating 2 bits 0-3 are mapped to 0, 4-7 that are mapped to 1, and so on.&lt;/p>
&lt;p>This is efficient, especially when using SIMD instructions and even has an example in the &amp;lsquo;&lt;a class="link" href="https://developer.arm.com/-/media/Arm%20Developer%20Community/PDF/Neon%20Programmers%20Guide/102159_0104_01_CodingForNeon.pdf?revision=a3235e10-ded9-4ac8-a415-badcafdd56a6" target="_blank" rel="noopener"
>Coding for Neon&lt;/a>&amp;rsquo; guide &lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>.
However, it introduces a bias. It would be better if there was a way to map 4-11 to 1 instead of 8-15, which would be similar &amp;lsquo;rounding&amp;rsquo;.&lt;/p>
&lt;p>This is possible due to offsets, so before shifting by 3 (dividing by 8), half of that is added (+4).
This results in:&lt;/p>
&lt;blockquote>
&lt;p>0-3 -&amp;gt; 0&lt;br>
4-11 -&amp;gt; 1&lt;br>
12-17 -&amp;gt; 2&lt;br>
&amp;hellip;&lt;/p>&lt;/blockquote>
&lt;p>A scalar version of this algorithm could look like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_scalar&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i&lt;span style="color:#fe8019">++&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// retrieve RGB 888 values
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> r &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> g &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> b &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// add half the lost precision before truncating
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> r5 &lt;span style="color:#fe8019">=&lt;/span> (r &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +4 is half of 8 (2^3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> g6 &lt;span style="color:#fe8019">=&lt;/span> (g &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +2 is half of 4 (2^2)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> b5 &lt;span style="color:#fe8019">=&lt;/span> (b &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +4 is half of 8 (2^3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// clamp to prevent overflow
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fe8019">if&lt;/span> (r5 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span> r5 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (g6 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">63&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span> g6 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">63&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (b5 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span> b5 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// packing 16 bit value
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> value &lt;span style="color:#fe8019">=&lt;/span> (&lt;span style="color:#fabd2f">uint16_t&lt;/span>)((r5 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">11&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> (g6 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">5&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> b5);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// save RGB 565 values
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> ((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer)[i] &lt;span style="color:#fe8019">=&lt;/span> value;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="vectorizing">Vectorizing
&lt;/h1>&lt;p>SIMD on Arm is implemented by the Neon architecture extension.
The register width is 128 bits, which is pretty small when compared to different SIMD extensions on x86,
such as 512 bits on AVX 512 or 256 bits on AVX2.
So the maximum number of values that would fit in a Neon register are 16 8 bit values.&lt;/p>
&lt;p>I have used the intrinsics provided by the &lt;code>neon.h&lt;/code> header file, as opposed to inline assembly.
The instructions will be the same, but the code is much more readable and easier to write.
The corresponding type provided by the Neon header file for our 16 8 bit values data type would be &lt;code>uint8x16_t&lt;/code>.
One more type that will be very useful is &lt;code>uint8x16x3_t&lt;/code>, representing 3 &lt;code>uint8x16_t&lt;/code>s, which is perfect for dealing
with color channels.&lt;/p>
&lt;h2 id="naive-approach">Naive Approach
&lt;/h2>&lt;p>Vectorizing this algorithm is very easy, since pixels are stored consecutively in a &lt;code>RGBRGBRGB&lt;/code> pattern.&lt;/p>
&lt;p>However, there is one problem:
The scalar algorithm does any arithmetic operations on 16 bit values, due to the chance of overflows.
So while it is possible to load 16 pixels using one instruction and packing 16 color values into one register,
the actual processing has to be done one 16-bit integers, which limits the number of color values per register to 8.&lt;/p>
&lt;p>So that means one of two things for the vectorized version:&lt;/p>
&lt;ol>
&lt;li>Only load 3x8 values, since that is the max numbers that can be processed with one instruction. I will refer to this
approach as &amp;lsquo;8P&amp;rsquo; moving forward.&lt;/li>
&lt;li>Load 3x16 values, but separate the color values into 2 registers per channel before doing arithmetic operations.
I will refer to this approach as &amp;lsquo;16P&amp;rsquo; in the future.&lt;/li>
&lt;/ol>
&lt;p>The number of arithmetic instruction required to process the data is the same for both approaches.
The second approach (16P) will process 16 pixels per iteration, but requires twice the &lt;code>add&lt;/code>, &lt;code>shift&lt;/code> and &lt;code>or&lt;/code> instructions.
However, processing 16 pixels per iteration reduces the required load instructions by half, and the same
actually applies to stores as we will see later.
Though this comes at the cost of a higher register usage.&lt;/p>
&lt;p>This is also reflected in the generated assembly.&lt;/p>
&lt;p>Particularly interesting are the parts inside the for-loop.
The first 2 instructions (locations &lt;code>100001e58&lt;/code> &amp;amp; &lt;code>100001e5c&lt;/code> in the 8P implementation)
load the source and compute the offset to load the pixels to be processed into the correct registers.
The algorithm really starts &lt;code>ld3.8b { v4, v5, v6 }, [x11]&lt;/code> at &lt;code>100001e60&lt;/code> loading the pixels into SIMD registers.
16P uses the &lt;code>ld3.16b { v4, v5, v6 }, [x11]&lt;/code> instruction instead (from location &lt;code>100001f30&lt;/code>)
As you can see they are almost identical, the only difference is in the operand suffix (&lt;code>16b&lt;/code> vs &lt;code>8b&lt;/code>).
The number indicates the number of values that are loaded, and the letter describes the data type.
In this case 16 bytes and 8 bytes respectively&lt;sup id="fnref:2">&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref">2&lt;/a>&lt;/sup>.
The rest is exactly the same except that 16P executes every arithmetic instruction
twice (once on the upper and once on the lower half of course) and uses more registers.&lt;/p>
&lt;p>Below is a brief explanation of the entire generated assembly for the loop body.
The full assembly can be found in the &lt;a class="link" href="#processing-8-pixels-per-iteration" >Appendix&lt;/a>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e58:&lt;/span> &lt;span style="color:#fabd2f">f940000b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load source buffer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e5c:&lt;/span> 8&lt;span style="color:#fabd2f">b08016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span> &lt;span style="color:#928374;font-style:italic">; compute current location offset
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e60:&lt;/span> 0&lt;span style="color:#fabd2f">c404164&lt;/span> &lt;span style="color:#d3869b">ld3.8b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x11&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load pixels
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e64:&lt;/span> 2&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span> &lt;span style="color:#928374;font-style:italic">; add 4 to red
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e68:&lt;/span> 2&lt;span style="color:#fabd2f">e251030&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span> &lt;span style="color:#928374;font-style:italic">; add 2 to green
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e6c:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e7&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3 ; shift red
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e70:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0610&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2 ; shift green
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e74:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> &lt;span style="color:#928374;font-style:italic">; add 4 to blue
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e78:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3 ; shift blue
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e7c:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span> &lt;span style="color:#928374;font-style:italic">; clamp red
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e80:&lt;/span> 6&lt;span style="color:#fabd2f">e636e06&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span> &lt;span style="color:#928374;font-style:italic">; clamp green
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e84:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54a5&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb ; shift red to its location in the 16 bit buffer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e88:&lt;/span> 4&lt;span style="color:#fabd2f">f1554c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5 ; shift green to its location in the 16 bit buffer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e8c:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span> &lt;span style="color:#928374;font-style:italic">; clamp blue
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e90:&lt;/span> 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span> &lt;span style="color:#928374;font-style:italic">; or red and green together
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e94:&lt;/span> 4&lt;span style="color:#fabd2f">ea41ca4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span> &lt;span style="color:#928374;font-style:italic">; or blue with red &amp;amp; green
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e98:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load destination base pointer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e9c:&lt;/span> 3&lt;span style="color:#fabd2f">ca96964&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>] &lt;span style="color:#928374;font-style:italic">; write result back to buffer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ea0:&lt;/span> 9100214&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x8 ; i += 8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ea4:&lt;/span> &lt;span style="color:#fabd2f">a941300b&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10] ; load loop bound values
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ea8:&lt;/span> 9&lt;span style="color:#fabd2f">b0b7d8b&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span> &lt;span style="color:#928374;font-style:italic">; compute total/limit
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">eac:&lt;/span> 91004129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10 ; advance output pointer (16 bytes)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">eb0:&lt;/span> 91006108 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x18 ; advance input pointer (24 bytes)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">eb4:&lt;/span> &lt;span style="color:#fabd2f">eb0a017f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span> &lt;span style="color:#928374;font-style:italic">; check for condition
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">eb8:&lt;/span> 54&lt;span style="color:#fabd2f">fffd08&lt;/span> &lt;span style="color:#d3869b">b.hi&lt;/span> &lt;span style="color:#d3869b">0x100001914&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_8vals&lt;/span>+&lt;span style="color:#d3869b">0x54&lt;/span>&amp;gt; &lt;span style="color:#928374;font-style:italic">; branch based on comparison result
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This totals 25 instructions from load to branch, resulting in 3.125 instructions per pixel.
The same routine, when processing 16 pixels per iteration (from location &lt;code>100001f28&lt;/code> to &lt;code>100001fc8&lt;/code>,
see &lt;a class="link" href="#processing-16-pixels-per-iteration" >Appendix&lt;/a>), takes 41 instructions, resulting in 2.5625 instructions per pixel.&lt;/p>
&lt;p>So all else being equal it is expected that 16P is a little faster,
at least assuming there is no cost associated with the extra register usage.
Note that that might not always be the case, especially with high memory pressure.
However, the benchmarks are conducted with enough free RAM and low memory pressure
to reduce influences by outside, non-related causes.&lt;/p>
&lt;h2 id="optimized-algorithm">Optimized Algorithm
&lt;/h2>&lt;p>However, 16P has one fundamental flaw:&lt;/p>
&lt;p>It does not truly increase the throughput by 16x.&lt;/p>
&lt;p>While 8P actually processed 8 pixels with a similar amount of instructions,
16P only loads and stores 16 pixels at once.
For processing, the pixels are split into two 8 value registers, since the processing is fundamentally
done on 16 bit values, so it is technically not possible to do arithmetic operations on 16 values
at once, due the register sizes of 128 bits.&lt;/p>
&lt;p>To actually process 16 pixels, at least through most of the iteration, the algorithm has to be slightly changed,
so that more arithmetic operations can be done on 8 bit values.
And there is a way, that allows for processing 16 pixels for most of the
algorithm, only splitting and moving them into registers holding 16bit values when
combining the 3 color channels to RGB565.&lt;/p>
&lt;p>Fundamentally, instead of clamping the values after adding and shifting, an overflow
detection could be implemented that then sets the value to 255 if it overflowed.
This will result to the correct maximum of 31 &amp;amp; 64 respectively after shifting.&lt;/p>
&lt;p>Scalar pseudocode would look like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_neon&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i&lt;span style="color:#fe8019">++&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> r &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// same for green &amp;amp; blue just like before
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> r5 &lt;span style="color:#fe8019">=&lt;/span> r &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// +2 for green &amp;amp; +4 for blue, just like before
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (r5 &lt;span style="color:#fe8019">&amp;lt;&lt;/span> r)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span> r5 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">255&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// same for green &amp;amp; blue
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span> r5 &lt;span style="color:#fe8019">=&lt;/span> r5 &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// shift green &amp;amp; blue like before
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> value &lt;span style="color:#fe8019">=&lt;/span> (&lt;span style="color:#fabd2f">uint16_t&lt;/span>)((r5 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">11&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> (g6 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">5&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> b5);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> ((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer)[i] &lt;span style="color:#fe8019">=&lt;/span> value;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>A naive vectorization of the comparison operation of this version would be more complicated though.
The clamping in the original algorithm is essentially just a min between the
actual value and the max value.
When using Neon the &lt;code>vminq_u16&lt;/code> intrinsic can be used for this.&lt;/p>
&lt;p>Reimplementing logic like that in Neon requires the comparison using &lt;code>vcgtq_u8&lt;/code>, creating a mask,
followed by &lt;code>vbslq_u8&lt;/code>, which uses the mask to either set the current value or 255.
The full implementation of this implementation can be found in the &lt;a class="link" href="#optimized-version-processing-16-pixels-per-iteration-if-using-mask" >Appendix&lt;/a>.&lt;/p>
&lt;p>However, there is a way to avoid the comparison and masking through the use of &amp;lsquo;&lt;a class="link" href="https://developer.arm.com/documentation/dui0489/c/arm-and-thumb-instructions/saturating-instructions/saturating-arithmetic?lang=en" target="_blank" rel="noopener"
>saturating arithmetic&lt;/a>&amp;rsquo;.
A &amp;lsquo;saturation add&amp;rsquo; will perform a pairwise addition as usual, but it will cap the result at the maximum value
(255 for 8 bit values).
Which is exactly what is needed here. The intrinsic for this operation is &lt;code>vqaddq_u8&lt;/code>.
This implementation can also be found in the &lt;a class="link" href="#optimized-version-processing-16-pixels-per-iteration-saturation-add" >Appendix&lt;/a>.
Using &amp;lsquo;saturation math&amp;rsquo; is not only simpler to implement but also expected to provide an even
more substantial performance improvement, since it reduces the number of required instructions compared to the masking approach.&lt;/p>
&lt;p>Throughout this post, I will use &amp;lsquo;Optimized Algorithm&amp;rsquo; (or &amp;lsquo;OA&amp;rsquo;) to refer to algorithm as a whole.
If it is necessary to distinguish between both implementations, &amp;lsquo;OA&amp;rsquo; will refer to the one using masks and
&amp;lsquo;SA&amp;rsquo; or &amp;lsquo;Saturation Add&amp;rsquo; will refer to the one using the &amp;lsquo;saturation add&amp;rsquo; operation.&lt;/p>
&lt;h1 id="benchmarks">Benchmarks
&lt;/h1>&lt;p>First I will give brief introduction on the benchmarking &amp;amp; data collection settings and environment.
This is followed by a concise analysis of the collected data.
Finally, I will go over the different results comparing different implementations and finish this section with a brief subsection about limitations.&lt;/p>
&lt;p>The purpose of these benchmarks are to answer the following questions:&lt;/p>
&lt;ol>
&lt;li>When vectorizing the original algorithm, is the extra register usage of processing 16 pixels per iteration better than processing 8 pixels per iteration?&lt;/li>
&lt;li>Can the compiler automatically vectorize the algorithm? How would the compiler generated version compare to the hand vectorized version?&lt;/li>
&lt;li>How does the improved algorithm compare against the compiler generated version?&lt;/li>
&lt;li>What is the difference does the use of the &amp;lsquo;saturation add&amp;rsquo; make?&lt;/li>
&lt;li>What is the baseline speed (scalar) and how do the different versions compare against baseline but also against each other?&lt;/li>
&lt;/ol>
&lt;h2 id="benchmark-settings">Benchmark settings
&lt;/h2>&lt;p>The parameters under which the benchmarks were ran are as follows:&lt;/p>
&lt;ol>
&lt;li>Benchmarks are executed on 2682 RGB888 images with 200x200 pixels.&lt;/li>
&lt;li>The benchmark runs every function on every image.&lt;/li>
&lt;li>There are always 5 warm-up runs before the timed runs.&lt;/li>
&lt;li>There are 20 timed runs and the median is selected as the particular result for that function &amp;amp; image combination.&lt;/li>
&lt;li>Output buffers are reused but set to 0 after every run.&lt;/li>
&lt;li>Every image runs in its own process to avoid crashes in case of invalid inputs, but they are running sequentially.&lt;/li>
&lt;li>I am running the benchmarks on a MacBook M3 Pro (no power saving mode).&lt;/li>
&lt;li>&lt;code>setpriority&lt;/code> is used to increase the processes priority and thereby reduce interference by other processes.&lt;/li>
&lt;/ol>
&lt;h2 id="data-analysis">Data Analysis
&lt;/h2>&lt;p>&lt;a class="link" href="#data-collected" >Figure 1.1&lt;/a> shows the collected data.
There are some significant outliers, due to a variety of possibilities.
On macOS it&amp;rsquo;s unfortunately not possible to pin processes to a specific CPU, so those could be due to context switches.
They could also possibly be due to interrupts from the operating system.
Unfortunately it appears that it is not possible to set scheduling settings such as &lt;code>SCHED_FIFO&lt;/code> on Linux either.&lt;/p>
&lt;p>I have tried to minimize outside influences and reduce memory pressure by closing unimportant programs such as browsers
or any other user programs that would be running on my machine.
But I don&amp;rsquo;t have a specific benchmarking machine set up just for benchmarks, so they were ran on my personal laptop, so there
still are likely suboptimal conditions influencing the benchmark.&lt;/p>
&lt;p>To try to get as reliable results as possible, I have set the priority/niceness using &lt;code>setpriority&lt;/code> (which obsoletes &lt;code>nice&lt;/code>&lt;sup id="fnref:3">&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref">3&lt;/a>&lt;/sup>).
I also set the QoS settings to the highest priority to try and keep the benchmark on a P-Core&lt;sup id="fnref:4">&lt;a href="#fn:4" class="footnote-ref" role="doc-noteref">4&lt;/a>&lt;/sup>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">// set priority
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fe8019">if&lt;/span> (&lt;span style="color:#fabd2f">setpriority&lt;/span>(PRIO_PROCESS, &lt;span style="color:#d3869b">0&lt;/span>, &lt;span style="color:#fe8019">-&lt;/span>&lt;span style="color:#d3869b">20&lt;/span>) &lt;span style="color:#fe8019">==&lt;/span> &lt;span style="color:#fe8019">-&lt;/span>&lt;span style="color:#d3869b">1&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fabd2f">perror&lt;/span>(&lt;span style="color:#b8bb26">&amp;#34;setpriority failed - try running as root&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">// Set QoS to user-interactive to encourage P-core scheduling
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fe8019">if&lt;/span> (&lt;span style="color:#fabd2f">pthread_set_qos_class_self_np&lt;/span>(QOS_CLASS_USER_INTERACTIVE, &lt;span style="color:#d3869b">0&lt;/span>) &lt;span style="color:#fe8019">!=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span> &lt;span style="color:#fabd2f">perror&lt;/span>(&lt;span style="color:#b8bb26">&amp;#34;pthread_set_qos_class_self_np failed&amp;#34;&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span> &lt;span style="color:#fe8019">return&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div id="data-collection" style="display: flex; gap: 1rem; justify-content: center;">
&lt;figure id="data-collected" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/data_violin.png" />
&lt;figcaption>Collected Data&lt;/figcaption>
&lt;/figure>
&lt;figure id="data-cleaned" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/data_violin_cleaned.png" />
&lt;figcaption>Collected Data Cleaned&lt;/figcaption>
&lt;/figure>
&lt;/div>
&lt;p>Since I didn&amp;rsquo;t want to distort the data, I took a reliable but conservative approach to removing outliers.
For each function, I replaced any values above the 80^(th) percentile or below the 20^(th) percentile with the median.
The corrected distributions are displayed in &lt;a class="link" href="#data-cleaned" >Figure 1.2&lt;/a>&lt;/p>
&lt;h2 id="baseline">Baseline
&lt;/h2>&lt;p>First it is important to establish a baseline that any optimization is compared against.
For this a truly scalar implementation is used.
To achieve this, &lt;code>-O3&lt;/code> optimizations were enabled during compilation (same as every other function).
However, to make sure the compiler does not vectorize the algorithm, 2 pragmas were used:&lt;/p>
&lt;p>&lt;code>#pragma clang loop vectorize(disable)&lt;/code> and &lt;code>#pragma clang loop interleave(disable)&lt;/code>.&lt;/p>
&lt;p>Mean execution time for this configuration is 27031ns.&lt;/p>
&lt;h2 id="8-vs-16-pixels-per-iteration">8 vs 16 pixels per iteration
&lt;/h2>&lt;div style="display: flex; gap: 1rem; justify-content: center;">
&lt;figure id="boxplot-8-vs-16" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/boxplot_8_vs_16_vals.png" />
&lt;figcaption>Boxplot comparison between 8 &amp; 16 pixels per iteration&lt;/figcaption>
&lt;/figure>
&lt;figure id="cdf-8-vs-16" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/cdf_8_vs_16_vals.png" />
&lt;figcaption>ECDF comparing 8 &amp; 16 pixels per iteration&lt;/figcaption>
&lt;/figure>
&lt;/div>
&lt;p>While both approaches achieve an equal median performance, processing 16 pixels per iteration shows better consistency, and a slightly higher mean performance, as displayed in the &lt;a class="link" href="#cdf-8-vs-16" >ECDF&lt;/a>.
The &lt;a class="link" href="#boxplot-8-vs-16" >Boxplot&lt;/a> also suggests that the worst case execution time of 16P appears to be an outlier, which could be due to other factors such as context switches or CPU frequency scaling, as the boxplot is very flat at a consistent 5000ns.
8P, on the other hand shows equal performance to 16P on the lower and medium quatiles, but starts to diverge at the higher quartiles.&lt;/p>
&lt;p>I&amp;rsquo;ve determined that 16P outperforms 8P slightly, given that 8P&amp;rsquo;s performance is more variable and has a marginally, but significant, higher mean.&lt;/p>
&lt;p>So to answer the question:&lt;/p>
&lt;blockquote>
&lt;ol>
&lt;li>When vectorizing the original algorithm, is the extra register usage of processing 16 pixels per iteration better than processing 8 pixels per iteration?&lt;/li>
&lt;/ol>&lt;/blockquote>
&lt;p>Yes, given the benchmarking parameters, 16P outperforms 8P. Though not by much.&lt;/p>
&lt;h2 id="auto-vectorization">Auto Vectorization
&lt;/h2>&lt;p>In this section I will look into the optimizations that the compiler made to scalar algorithm,
to answer the questions:&lt;/p>
&lt;ol>
&lt;li>Can the compiler automatically vectorize the scalar implementation?&lt;/li>
&lt;li>How does it perform compared to other implementations?&lt;/li>
&lt;/ol>
&lt;h3 id="analysis">Analysis
&lt;/h3>&lt;p>The full assembly can be found in the &lt;a class="link" href="#scalar-algorithm-auto-vectorized" >Appendix&lt;/a>, but I will give a brief overview here:&lt;/p>
&lt;p>The compiler actually generated 3 different paths:&lt;/p>
&lt;ol>
&lt;li>A truly scalar version (similar to the one would be generated if you disable the vectorization optimizations).&lt;/li>
&lt;li>A version that processes 8 pixels per iteration (similar to what I wrote by hand).&lt;/li>
&lt;li>A version that processes 16 pixels per iteration (similar to what I wrote by hand).&lt;/li>
&lt;/ol>
&lt;blockquote>
&lt;p>So yes, the compiler can automatically vectorize this algorithm/implementation.&lt;/p>&lt;/blockquote>
&lt;p>I will refer to this as &amp;lsquo;CGV&amp;rsquo; (&amp;lsquo;Compiler Generated Version&amp;rsquo;) moving forward.&lt;/p>
&lt;p>I did a full deep dive on the difference between the assembly generated from the 16P and the CGV
in &lt;a class="link" href="https://vtbl.dev/posts/what-compilers-really-do/" >this&lt;/a> post here, going over the generated
assembly line by line with explanations as to why the compiler might have generated those
particular instructions.
But the main difference came from the way values were written back to memory at the
end of each iteration.&lt;/p>
&lt;p>In the CGV, this is done by a single instruction:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>10000171&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">ac8115a4&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x13&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>stp&lt;/code> instruction takes two SIMD vectors and stores them to a specific address plus a given offset,
basically vectorizing the &amp;lsquo;store&amp;rsquo;.
The store sequence for the version that I vectorized were a little more complex and less efficient.&lt;/p>
&lt;p>Below you can see the 5 instructions, that the compiler generated.
They load the store address from memory
twice and then individually store the data to the respective offset:&lt;/p>
&lt;ul>
&lt;li>&amp;lsquo;$2 \cdot i$&amp;rsquo;, as &lt;code>i&lt;/code> counts number of pixels, each pixel being 2 bytes, and&lt;/li>
&lt;li>&amp;lsquo;$2 \cdot i + 16$&amp;rsquo;, for the second set of 8 pixels, again, each pixel being 2 bytes.&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f98:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load store address (dst-&amp;gt;buffer) from memory
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">; ... remaining scheduled SIMD instruction
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fa0:&lt;/span> 3&lt;span style="color:#fabd2f">ca96964&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>] &lt;span style="color:#928374;font-style:italic">; store q4 to base + (2 * i)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fa4:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load store address (dst-&amp;gt;buffer) from memory
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fa8:&lt;/span> 8&lt;span style="color:#fabd2f">b09016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span> &lt;span style="color:#928374;font-style:italic">; x11 = 2 * i
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fac:&lt;/span> 3&lt;span style="color:#fabd2f">d800565&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10] ; store q5 to (2 * i) + 16
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="results">Results
&lt;/h3>&lt;p>As one can see in the benchmark results of the CGV and 16P versions &lt;a class="link" href="#autovec-vs-16-vals" >below&lt;/a>,
they perform almost the same.
The difference is actually slightly larger if the benchmarks are ran with a &amp;rsquo;niceness&amp;rsquo; of 0,
then the CGV slightly, but measurably outperforms 16P.
However, there is no real difference with a &amp;rsquo;niceness&amp;rsquo; of -20.&lt;/p>
&lt;div id="autovec-vs-16-vals" style="display: flex; gap: 1rem; justify-content: center;">
&lt;figure style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/boxplot_16_values_vs_auto_vectorized.png" />
&lt;/figure>
&lt;figure id="autovec-vs-16-val-cdf" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/cdf_16_vals_vs_scalar_autovectorized.png" />
&lt;/figure>
&lt;/div>
&lt;p>Adjusting the code, so the compiler also generates a &lt;code>stp&lt;/code> instruction for my manually
vectorized version also closes the gap with a &amp;rsquo;niceness&amp;rsquo; of 0.&lt;/p>
&lt;p>So in the end, the compiler generated the same SIMD instructions, but it could generate slightly
better assembly around that.
Again, in a &lt;a class="link" href="https://vtbl.dev/posts/what-compilers-really-do/" >different post&lt;/a> I use this example to
try and figure out why that is.&lt;/p>
&lt;h2 id="optimized-algorithm-1">Optimized Algorithm
&lt;/h2>&lt;p>Since the CGV and 16P versions are essentially equal, it is expected that the Optimized Algorithm
outperforms them both, since it essentially doubles throughput for at least part of the arithmetic.
The figure &lt;a class="link" href="#cgv-vs-oa" >below&lt;/a> displays this performance improvement of 6.46 times higher compared
to scalar baseline (as opposed to 5.44x from CGV).&lt;/p>
&lt;div id="cgv-vs-oa" style="display: flex; gap: 1rem; justify-content: center;">
&lt;figure style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/boxplot_optimzed_vs_cgv.png" />
&lt;/figure>
&lt;figure id="cgv-vs-oa-cdf" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/cdf_optimized_vs_cgv.png" />
&lt;/figure>
&lt;/div>
&lt;h3 id="saturation-add">Saturation Add
&lt;/h3>&lt;p>The usage of the saturation add widens this difference even further, resulting in an 8.49x improvement
compared to baseline.
The corresponding &lt;a class="link" href="#cgv-vs-sa-cdf" >ECDF&lt;/a> illustrates this very clearly, outperforming even the &lt;a class="link" href="#sa-vs-oa-cdf" >original OA&lt;/a> by 1/4.&lt;/p>
&lt;div id="cgv-vs-sa" style="display: flex; gap: 1rem; justify-content: center;">
&lt;figure id="sa-vs-oa-cdf" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/cdf_sat_add_vs_mask.png" />
&lt;/figure>
&lt;figure id="cgv-vs-sa-cdf" style="margin: 0; text-align: center;">
&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/cdf_sat_add_vs_cgv.png" />
&lt;/figure>
&lt;/div>
&lt;h2 id="summary">Summary
&lt;/h2>&lt;p>An 8.5x speedup to a truly scalar version can be achieved by using vectorization.
However, modern compilers are able to achieve very good results as well, and the only way to really
beat it (in this instance) was to make bigger algorithmic changes, that a compiler would not do.
It is not clear how well this applies to algorithms that are less trivial to optimize though.&lt;/p>
&lt;p>There also is a stark drop-off in performance improvement when moving from processing 8 pixels per iteration to 16,
until the Optimized Algorithm (with &amp;lsquo;saturation add&amp;rsquo;) caused a significant jump by enabling the higher throughput,
with a similar amount of operations.
A curve about the speedup trend can be found below the table.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Implementation&lt;/th>
&lt;th>Mean (ns)&lt;/th>
&lt;th>90th Percentile (ns)&lt;/th>
&lt;th>Relative Speedup&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>scalar (no auto vectorization)&lt;/td>
&lt;td>27149.33&lt;/td>
&lt;td>29000.0&lt;/td>
&lt;td>1.00&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CGV&lt;/td>
&lt;td>4994.22&lt;/td>
&lt;td>5000.0&lt;/td>
&lt;td>5.44&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>8 pixels&lt;/td>
&lt;td>5252.42&lt;/td>
&lt;td>6000.0&lt;/td>
&lt;td>5.17&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>16 pixels&lt;/td>
&lt;td>4999.81&lt;/td>
&lt;td>5000.0&lt;/td>
&lt;td>5.42&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Optimized Algorithm&lt;/td>
&lt;td>4203.58&lt;/td>
&lt;td>5000.0&lt;/td>
&lt;td>6.46&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>OA with Saturation Add&lt;/td>
&lt;td>3199.48&lt;/td>
&lt;td>4000.0&lt;/td>
&lt;td>8.49&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>&lt;img src="https://vtbl.dev/images/simd-macbook-m3-pro/relative_speedups.png"
loading="lazy"
alt="Algorithm dependent speedups"
>&lt;/p>
&lt;h2 id="limitations">Limitations
&lt;/h2>&lt;p>I wanted to use &lt;code>pthread_set_qos_class_self_np&lt;/code> as well but macOS does not allow this when forking processes.
It can be done when using &lt;code>posix_spawn&lt;/code> instead, might do that in the future to see if it makes a difference.&lt;/p>
&lt;p>After all, &lt;code>setpriority&lt;/code> makes a huge difference, not only on the performance numbers themselves, but also on the consistency,
and thereby the distributions as a whole.
I had collected data without setting the priority/&lt;code>nice&lt;/code> value, and those results do look different.&lt;/p>
&lt;p>While I have reduced the amount of programs running in the background to keep memory pressure low,
there is no way completely control the caches or different processes.
MacOS also doesn&amp;rsquo;t have any real time or priority scheduling, or CPU pinning, so there will be some
influence due to interrupts/context switches.&lt;/p>
&lt;p>It might be interesting running the same benchmarks on a dedicated benchmarking machine with more control over
the operating system.
I might try this in the future using a Raspberry Pi.&lt;/p>
&lt;h1 id="conclusions">Conclusions
&lt;/h1>&lt;h2 id="1-modern-compilers-are-pretty-good">1. Modern Compilers are pretty good
&lt;/h2>&lt;p>Modern compilers are very capable at vectorizing code themselves. At least for easily optimizable problems.
Manual &amp;lsquo;optimizations&amp;rsquo; might actually keep the compiler from some improvements in other areas,
so it might not only be not worth it, but also hurting.&lt;/p>
&lt;p>However, it might be worth it when vectorization allows you to make structural improvements to the algorithm,
that a compiler would not be able to do (as in the case of the &amp;lsquo;Optimized Algorithm&amp;rsquo;).
But &amp;lsquo;dumb vectorization&amp;rsquo; is probably better left to the compiler. And if not it should be accompanied by incremental
benchmarks.&lt;/p>
&lt;h2 id="2-images-are-rather-small">2. Images are rather small
&lt;/h2>&lt;p>The performance differences are of course in the scale of microseconds, so the differences/improvements
will likely go unnoticed.
This is partially due to the relatively low number of iterations, due to the limited image size:
$$ \frac{200 \cdot 200 \text{ pixels}}{16 \text{ pixels/iteration}} = \frac{40 000 \text{ pixels}}{16 \text{ pixels/iteration}} = 2 500 \text{ iterations}$$&lt;/p>
&lt;p>For bigger image sizes or applications that process more data in general (such as processing point clouds),
the difference can be noticeable.&lt;/p>
&lt;h2 id="3-its-really-important-to-know-the-platform-specific-instructionsintrinsics">3. It&amp;rsquo;s really important to know the platform specific instructions/intrinsics
&lt;/h2>&lt;p>The implementation process of the optimized algorithm shows how important it is to know the instructions
of the platform the algorithm is implemented for.
Without using the saturation additions for example, the optimized version would only be ~19% faster than
the compiler generated version of the original algorithm.
As opposed to the ~56% speedup one would gain using the more optimal instructions.&lt;/p>
&lt;h2 id="4-real-world-vs-theoretical-performance">4. Real world vs theoretical performance
&lt;/h2>&lt;p>The theoretical performance gain for an 8P like implementation would be 8x relative to baseline.
The actual result is ~5x, which is significant, but not close to the theoretical limit.
The theoretical performance gain overall could be considered to be 16x, since 16 8bit values fit into one 128 bit register.
However, naive optimizations (by the compiler or by hand) does not necessarily bring you there.
Furthermore, I was not able to achieve this level of throughput throughout the whole loop body.&lt;/p>
&lt;p>So in reality, there is a:&lt;/p>
&lt;ul>
&lt;li>16x speedup for the loads&lt;/li>
&lt;li>16x speedup for the first addition incl. saturation&lt;/li>
&lt;li>16x speedup for the shift right&lt;/li>
&lt;/ul>
&lt;p>After that, green and red are split into upper and lower halfs, adding some penalty there, followed by:&lt;/p>
&lt;ul>
&lt;li>8x speedup in red and green shift&lt;/li>
&lt;li>8x speedup &lt;code>or&lt;/code>ing the values together&lt;/li>
&lt;/ul>
&lt;p>Finally, if a &lt;code>stp&lt;/code> instruction is emitted by the compiler,
then there is a 16x speedup in the store. Else it&amp;rsquo;s 8x.&lt;/p>
&lt;p>It is hard to put an exact number on what the expected speedup should be, however assuming the 16x and 8x parts make up
50% each, then a $\frac{8 + 16}{2} = 12x$ theoretical improvement could be expected.
Though that might not necessarily be accurate since memory access tends to be particularly slow.&lt;/p>
&lt;p>Either way, the final performance peak was ~8.5x, which shows, that there can be a significant gap between
expected/theoretical and actual performance.&lt;/p>
&lt;p>While there may be additional improvements possible through smarter register management, 8.5x is as good
as I can get it at this time.
I might revisit this in the future to see if I can figure out a way to do better.&lt;/p>
&lt;hr>
&lt;details id="appendix" >
&lt;summary>Appendix&lt;/summary>
&lt;h3 id="processing-8-pixels-per-iteration-8p">Processing 8 pixels per iteration (8P)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_neon_8vals&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_4 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">4&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_2 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_31 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">31&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_63 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">63&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x8x3_t&lt;/span> v_rgb888;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_rgb565;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span> v_rgb888 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vld3_u8&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> (i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">0&lt;/span>]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">1&lt;/span>]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">2&lt;/span>]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_r, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_g, v_2);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_b, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_r, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_g, &lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_b, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_r, v_31);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_g, v_63);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_b, v_31);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">31&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_r, &lt;span style="color:#d3869b">11&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">32&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_g, &lt;span style="color:#d3869b">5&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">33&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">34&lt;/span>&lt;span> v_rgb565 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_r, v_g);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">35&lt;/span>&lt;span> v_rgb565 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_rgb565, v_b);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">36&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">37&lt;/span>&lt;span> &lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i, v_rgb565);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">38&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">39&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>0000000100001&lt;span style="color:#fabd2f">e04&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_8vals&lt;/span>&amp;gt;:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e04:&lt;/span> &lt;span style="color:#fabd2f">a9bf7bfd&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">x29&lt;/span>, &lt;span style="color:#d3869b">x30&lt;/span>, [&lt;span style="color:#d3869b">sp&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x10]!
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e08:&lt;/span> 910003&lt;span style="color:#fabd2f">fd&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x29&lt;/span>, &lt;span style="color:#d3869b">sp&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e0c:&lt;/span> &lt;span style="color:#fabd2f">f9400808&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e10:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e14:&lt;/span> 54000581 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001ec4&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_8vals&lt;/span>+&lt;span style="color:#d3869b">0xc0&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e18:&lt;/span> &lt;span style="color:#fabd2f">f9400c08&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x18]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e1c:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e20:&lt;/span> 54000541 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001ec8&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_8vals&lt;/span>+&lt;span style="color:#d3869b">0xc4&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e24:&lt;/span> &lt;span style="color:#fabd2f">f9400828&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e28:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e2c:&lt;/span> 54000501 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001ecc&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_8vals&lt;/span>+&lt;span style="color:#d3869b">0xc8&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e30:&lt;/span> &lt;span style="color:#fabd2f">f9400c28&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x18]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e34:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e38:&lt;/span> 540004&lt;span style="color:#fabd2f">c1&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001ed0&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_8vals&lt;/span>+&lt;span style="color:#d3869b">0xcc&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e3c:&lt;/span> &lt;span style="color:#fabd2f">d2800008&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e40:&lt;/span> &lt;span style="color:#fabd2f">d2800009&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e44:&lt;/span> &lt;span style="color:#fabd2f">d280000a&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e48:&lt;/span> 4&lt;span style="color:#fabd2f">f008480&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e4c:&lt;/span> 4&lt;span style="color:#fabd2f">f008441&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e50:&lt;/span> 4&lt;span style="color:#fabd2f">f0087e2&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v2&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e54:&lt;/span> 4&lt;span style="color:#fabd2f">f0187e3&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v3&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e58:&lt;/span> &lt;span style="color:#fabd2f">f940000b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e5c:&lt;/span> 8&lt;span style="color:#fabd2f">b08016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e60:&lt;/span> 0&lt;span style="color:#fabd2f">c404164&lt;/span> &lt;span style="color:#d3869b">ld3.8b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x11&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e64:&lt;/span> 2&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e68:&lt;/span> 2&lt;span style="color:#fabd2f">e251030&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e6c:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e7&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e70:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0610&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e74:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">31&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e78:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">32&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e7c:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">33&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e80:&lt;/span> 6&lt;span style="color:#fabd2f">e636e06&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">34&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e84:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54a5&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">35&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e88:&lt;/span> 4&lt;span style="color:#fabd2f">f1554c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">36&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">e8c:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">37&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e90:&lt;/span> 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">38&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e94:&lt;/span> 4&lt;span style="color:#fabd2f">ea41ca4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">39&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e98:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">40&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">e9c:&lt;/span> 3&lt;span style="color:#fabd2f">ca96964&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">41&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">ea0:&lt;/span> 9100214&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">42&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ea4:&lt;/span> &lt;span style="color:#fabd2f">a941300b&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">43&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ea8:&lt;/span> 9&lt;span style="color:#fabd2f">b0b7d8b&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">44&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">eac:&lt;/span> 91004129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">45&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">eb0:&lt;/span> 91006108 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x18
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">46&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">eb4:&lt;/span> &lt;span style="color:#fabd2f">eb0a017f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">47&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">eb8:&lt;/span> 54&lt;span style="color:#fabd2f">fffd08&lt;/span> &lt;span style="color:#d3869b">b.hi&lt;/span> &lt;span style="color:#d3869b">0x100001e58&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_8vals&lt;/span>+&lt;span style="color:#d3869b">0x54&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">48&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">ebc:&lt;/span> &lt;span style="color:#fabd2f">a8c17bfd&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x29&lt;/span>, &lt;span style="color:#d3869b">x30&lt;/span>, [&lt;span style="color:#d3869b">sp&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">49&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ec0:&lt;/span> &lt;span style="color:#fabd2f">d65f03c0&lt;/span> &lt;span style="color:#d3869b">ret&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="processing-16-pixels-per-iteration-16p">Processing 16 pixels per iteration (16P)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_neon_16_vals&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_4 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">4&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_2 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_31 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">31&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_63 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u16&lt;/span>(&lt;span style="color:#d3869b">63&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16x3_t&lt;/span> v_rgb888;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_rgb565_high;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_rgb565_low;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span> v_rgb888 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vld3q_u8&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> (i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">0&lt;/span>]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">0&lt;/span>]));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">1&lt;/span>]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">1&lt;/span>]));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_b8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">2&lt;/span>]);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_b8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">2&lt;/span>]));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_r8_high, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_g8_high, v_2);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span> v_b8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_b8_high, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_r8_low, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_g8_low, v_2);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">31&lt;/span>&lt;span> v_b8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u16&lt;/span>(v_b8_low, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">32&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">33&lt;/span>&lt;span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_r8_high, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">34&lt;/span>&lt;span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_g8_high, &lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">35&lt;/span>&lt;span> v_b8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_b8_high, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">36&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">37&lt;/span>&lt;span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_r8_low, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">38&lt;/span>&lt;span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_g8_low, &lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">39&lt;/span>&lt;span> v_b8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u16&lt;/span>(v_b8_low, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">40&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">41&lt;/span>&lt;span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_r8_high, v_31);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">42&lt;/span>&lt;span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_g8_high, v_63);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">43&lt;/span>&lt;span> v_b8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_b8_high, v_31);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">44&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">45&lt;/span>&lt;span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_r8_low, v_31);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">46&lt;/span>&lt;span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_g8_low, v_63);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">47&lt;/span>&lt;span> v_b8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vminq_u16&lt;/span>(v_b8_low, v_31);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">48&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">49&lt;/span>&lt;span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_r8_high, &lt;span style="color:#d3869b">11&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">50&lt;/span>&lt;span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_g8_high, &lt;span style="color:#d3869b">5&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">51&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">52&lt;/span>&lt;span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_r8_low, &lt;span style="color:#d3869b">11&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">53&lt;/span>&lt;span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_g8_low, &lt;span style="color:#d3869b">5&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">54&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">55&lt;/span>&lt;span> v_rgb565_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_r8_high, v_g8_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">56&lt;/span>&lt;span> v_rgb565_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_rgb565_high, v_b8_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">57&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">58&lt;/span>&lt;span> v_rgb565_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_r8_low, v_g8_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">59&lt;/span>&lt;span> v_rgb565_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_rgb565_low, v_b8_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">60&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">61&lt;/span>&lt;span> &lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>, v_rgb565_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">62&lt;/span>&lt;span> &lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i, v_rgb565_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">63&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">64&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>0000000100001&lt;span style="color:#fabd2f">ed4&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>&amp;gt;:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">ed4:&lt;/span> &lt;span style="color:#fabd2f">a9bf7bfd&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">x29&lt;/span>, &lt;span style="color:#d3869b">x30&lt;/span>, [&lt;span style="color:#d3869b">sp&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x10]!
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ed8:&lt;/span> 910003&lt;span style="color:#fabd2f">fd&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x29&lt;/span>, &lt;span style="color:#d3869b">sp&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">edc:&lt;/span> &lt;span style="color:#fabd2f">f9400808&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ee0:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ee4:&lt;/span> 54000781 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001fd4&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>+&lt;span style="color:#d3869b">0x100&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">ee8:&lt;/span> &lt;span style="color:#fabd2f">f9400c08&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x18]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">eec:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ef0:&lt;/span> 54000741 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001fd8&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>+&lt;span style="color:#d3869b">0x104&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">ef4:&lt;/span> &lt;span style="color:#fabd2f">f9400828&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">ef8:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">efc:&lt;/span> 54000701 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001fdc&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>+&lt;span style="color:#d3869b">0x108&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f00:&lt;/span> &lt;span style="color:#fabd2f">f9400c28&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x18]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f04:&lt;/span> &lt;span style="color:#fabd2f">f103211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xc8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f08:&lt;/span> 540006&lt;span style="color:#fabd2f">c1&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001fe0&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>+&lt;span style="color:#d3869b">0x10c&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f0c:&lt;/span> &lt;span style="color:#fabd2f">d2800008&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f10:&lt;/span> &lt;span style="color:#fabd2f">d2800009&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f14:&lt;/span> &lt;span style="color:#fabd2f">d280000a&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f18:&lt;/span> 4&lt;span style="color:#fabd2f">f008480&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f1c:&lt;/span> 4&lt;span style="color:#fabd2f">f008441&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f20:&lt;/span> 4&lt;span style="color:#fabd2f">f0087e2&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v2&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f24:&lt;/span> 4&lt;span style="color:#fabd2f">f0187e3&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v3&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f28:&lt;/span> &lt;span style="color:#fabd2f">f940000b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f2c:&lt;/span> 8&lt;span style="color:#fabd2f">b08016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f30:&lt;/span> 4&lt;span style="color:#fabd2f">c404164&lt;/span> &lt;span style="color:#d3869b">ld3.16b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x11&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f34:&lt;/span> 6&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f38:&lt;/span> 6&lt;span style="color:#fabd2f">e251030&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f3c:&lt;/span> 6&lt;span style="color:#fabd2f">e261011&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f40:&lt;/span> 2&lt;span style="color:#fabd2f">e241012&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f44:&lt;/span> 2&lt;span style="color:#fabd2f">e251033&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">31&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f48:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">32&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f4c:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e5&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">33&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f50:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0606&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">34&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f54:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0627&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">35&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f58:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0650&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">36&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f5c:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0671&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">37&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f60:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">38&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f64:&lt;/span> 6&lt;span style="color:#fabd2f">e626ca5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">39&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f68:&lt;/span> 6&lt;span style="color:#fabd2f">e636cc6&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">40&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f6c:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce7&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">41&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f70:&lt;/span> 6&lt;span style="color:#fabd2f">e626e10&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">42&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f74:&lt;/span> 6&lt;span style="color:#fabd2f">e636e31&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">43&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f78:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">44&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f7c:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54a5&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">45&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f80:&lt;/span> 4&lt;span style="color:#fabd2f">f1554c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">46&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f84:&lt;/span> 4&lt;span style="color:#fabd2f">f1b5610&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">47&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f88:&lt;/span> 4&lt;span style="color:#fabd2f">f155631&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">48&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f8c:&lt;/span> 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">49&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f90:&lt;/span> 4&lt;span style="color:#fabd2f">eb01e26&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">50&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f94:&lt;/span> 4&lt;span style="color:#fabd2f">ea41cc4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">51&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f98:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">52&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f9c:&lt;/span> 4&lt;span style="color:#fabd2f">ea71ca5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">53&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fa0:&lt;/span> 3&lt;span style="color:#fabd2f">ca96964&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">54&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fa4:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">55&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fa8:&lt;/span> 8&lt;span style="color:#fabd2f">b09016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">56&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fac:&lt;/span> 3&lt;span style="color:#fabd2f">d800565&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">57&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb0:&lt;/span> 9100414&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">58&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb4:&lt;/span> &lt;span style="color:#fabd2f">a941300b&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">59&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb8:&lt;/span> 9&lt;span style="color:#fabd2f">b0b7d8b&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">60&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fbc:&lt;/span> 91008129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">61&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fc0:&lt;/span> 9100&lt;span style="color:#fabd2f">c108&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x30
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">62&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fc4:&lt;/span> &lt;span style="color:#fabd2f">eb0a017f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">63&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fc8:&lt;/span> 54&lt;span style="color:#fabd2f">fffb08&lt;/span> &lt;span style="color:#d3869b">b.hi&lt;/span> &lt;span style="color:#d3869b">0x100001f28&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>+&lt;span style="color:#d3869b">0x54&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">64&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fcc:&lt;/span> &lt;span style="color:#fabd2f">a8c17bfd&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x29&lt;/span>, &lt;span style="color:#d3869b">x30&lt;/span>, [&lt;span style="color:#d3869b">sp&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">65&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fd0:&lt;/span> &lt;span style="color:#fabd2f">d65f03c0&lt;/span> &lt;span style="color:#d3869b">ret&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="optimized-version-processing-16-pixels-per-iteration-using-masks">Optimized version, processing 16 pixels per iteration (using masks)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_neon&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_4 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u8&lt;/span>(&lt;span style="color:#d3869b">4&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_2 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u8&lt;/span>(&lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_255 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u8&lt;/span>(&lt;span style="color:#d3869b">255&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// expecting 200x200 image
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">assert&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_WIDTH);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span> &lt;span style="color:#fabd2f">assert&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_HEIGHT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span> &lt;span style="color:#fabd2f">assert&lt;/span>(dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_WIDTH);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span> &lt;span style="color:#fabd2f">assert&lt;/span>(dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_HEIGHT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16x3_t&lt;/span> v_rgb888;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_rgb565_high;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_rgb565_low;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> v_rgb888 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vld3q_u8&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> (i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_r &lt;span style="color:#fe8019">=&lt;/span> v_rgb888.val[&lt;span style="color:#d3869b">0&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_g &lt;span style="color:#fe8019">=&lt;/span> v_rgb888.val[&lt;span style="color:#d3869b">1&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_b &lt;span style="color:#fe8019">=&lt;/span> v_rgb888.val[&lt;span style="color:#d3869b">2&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u8&lt;/span>(v_r, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u8&lt;/span>(v_g, v_2);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vaddq_u8&lt;/span>(v_b, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// handle overflow
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> r_mask &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vcgtq_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">0&lt;/span>], v_r);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">31&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> g_mask &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vcgtq_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">1&lt;/span>], v_g);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">32&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> b_mask &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vcgtq_u8&lt;/span>(v_rgb888.val[&lt;span style="color:#d3869b">2&lt;/span>], v_b);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">33&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">34&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vbslq_u8&lt;/span>(r_mask, v_255, v_r);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">35&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vbslq_u8&lt;/span>(g_mask, v_255, v_g);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">36&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vbslq_u8&lt;/span>(b_mask, v_255, v_b);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">37&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">38&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u8&lt;/span>(v_r, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">39&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u8&lt;/span>(v_g, &lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">40&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u8&lt;/span>(v_b, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">41&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">42&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_r);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">43&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_r));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">44&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">45&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_g);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">46&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_g));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">47&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">48&lt;/span>&lt;span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_r8_high, &lt;span style="color:#d3869b">11&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">49&lt;/span>&lt;span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_g8_high, &lt;span style="color:#d3869b">5&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">50&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">51&lt;/span>&lt;span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_r8_low, &lt;span style="color:#d3869b">11&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">52&lt;/span>&lt;span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_g8_low, &lt;span style="color:#d3869b">5&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">53&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">54&lt;/span>&lt;span> v_rgb565_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_r8_high, v_g8_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">55&lt;/span>&lt;span> v_rgb565_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_rgb565_high, &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_b));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">56&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">57&lt;/span>&lt;span> v_rgb565_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_r8_low, v_g8_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">58&lt;/span>&lt;span> v_rgb565_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_rgb565_low, &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_b)));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">59&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">60&lt;/span>&lt;span> &lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i, v_rgb565_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">61&lt;/span>&lt;span> &lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>, v_rgb565_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">62&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">63&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="optimized-version-processing-16-pixels-per-iteration-saturation-add">Optimized version, processing 16 pixels per iteration (saturation add)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_neon&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_4 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u8&lt;/span>(&lt;span style="color:#d3869b">4&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_2 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u8&lt;/span>(&lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span> &lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_255 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vdupq_n_u8&lt;/span>(&lt;span style="color:#d3869b">255&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// expecting 200x200 image
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">assert&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_WIDTH);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span> &lt;span style="color:#fabd2f">assert&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_HEIGHT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span> &lt;span style="color:#fabd2f">assert&lt;/span>(dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_WIDTH);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span> &lt;span style="color:#fabd2f">assert&lt;/span>(dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height &lt;span style="color:#fe8019">==&lt;/span> TARGET_IMG_HEIGHT);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16x3_t&lt;/span> v_rgb888;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_rgb565_high;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_rgb565_low;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> v_rgb888 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vld3q_u8&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> (i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_r &lt;span style="color:#fe8019">=&lt;/span> v_rgb888.val[&lt;span style="color:#d3869b">0&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_g &lt;span style="color:#fe8019">=&lt;/span> v_rgb888.val[&lt;span style="color:#d3869b">1&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8x16_t&lt;/span> v_b &lt;span style="color:#fe8019">=&lt;/span> v_rgb888.val[&lt;span style="color:#d3869b">2&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vqaddq_u8&lt;/span>(v_r, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vqaddq_u8&lt;/span>(v_g, v_2);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vqaddq_u8&lt;/span>(v_b, v_4);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span> v_r &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u8&lt;/span>(v_r, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span> v_g &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u8&lt;/span>(v_g, &lt;span style="color:#d3869b">2&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">31&lt;/span>&lt;span> v_b &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshrq_n_u8&lt;/span>(v_b, &lt;span style="color:#d3869b">3&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">32&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">33&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_r);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">34&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_r));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">35&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">36&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_g);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">37&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16x8_t&lt;/span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_g));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">38&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">39&lt;/span>&lt;span> v_r8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_r8_high, &lt;span style="color:#d3869b">11&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">40&lt;/span>&lt;span> v_g8_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_g8_high, &lt;span style="color:#d3869b">5&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">41&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">42&lt;/span>&lt;span> v_r8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_r8_low, &lt;span style="color:#d3869b">11&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">43&lt;/span>&lt;span> v_g8_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vshlq_n_u16&lt;/span>(v_g8_low, &lt;span style="color:#d3869b">5&lt;/span>);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">44&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">45&lt;/span>&lt;span> v_rgb565_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_r8_high, v_g8_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">46&lt;/span>&lt;span> v_rgb565_high &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_rgb565_high, &lt;span style="color:#fabd2f">vmovl_high_u8&lt;/span>(v_b));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">47&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">48&lt;/span>&lt;span> v_rgb565_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_r8_low, v_g8_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">49&lt;/span>&lt;span> v_rgb565_low &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vorrq_u16&lt;/span>(v_rgb565_low, &lt;span style="color:#fabd2f">vmovl_u8&lt;/span>(&lt;span style="color:#fabd2f">vget_low_u8&lt;/span>(v_b)));
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">50&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">51&lt;/span>&lt;span> &lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i, v_rgb565_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">52&lt;/span>&lt;span> &lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>, v_rgb565_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">53&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">54&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="scalar-algorithm">Scalar Algorithm
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_scalar&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i&lt;span style="color:#fe8019">++&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> r &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> g &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> b &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// Add half the lost precision before truncating
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> r5 &lt;span style="color:#fe8019">=&lt;/span> (r &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +4 is half of 8 (2^3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> g6 &lt;span style="color:#fe8019">=&lt;/span> (g &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +2 is half of 4 (2^2)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> b5 &lt;span style="color:#fe8019">=&lt;/span> (b &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +4 is half of 8 (2^3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// Clamp to prevent overflow
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fe8019">if&lt;/span> (r5 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span> r5 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (g6 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">63&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> g6 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">63&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (b5 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> b5 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> value &lt;span style="color:#fe8019">=&lt;/span> (&lt;span style="color:#fabd2f">uint16_t&lt;/span>)((r5 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">11&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> (g6 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">5&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> b5);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span> ((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer)[i] &lt;span style="color:#fe8019">=&lt;/span> value;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="scalar-algorithm-auto-vectorized">Scalar Algorithm (auto vectorized)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>0000000100001554 &amp;lt;&lt;span style="color:#fabd2f">_rgb888_to_rgb565_scalar&lt;/span>&amp;gt;:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>100001554: &lt;span style="color:#fabd2f">a9412408&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001558: 9&lt;span style="color:#fabd2f">b087d28&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>10000155&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">b4000988&lt;/span> &lt;span style="color:#d3869b">cbz&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">0x10000168c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x138&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>100001560: &lt;span style="color:#fabd2f">f9400009&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>100001564: &lt;span style="color:#fabd2f">f940002a&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>100001568: &lt;span style="color:#fabd2f">f100211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000156&lt;span style="color:#fb4934">c:&lt;/span> 54000543 &lt;span style="color:#fabd2f">b.lo&lt;/span> &lt;span style="color:#d3869b">0x100001614&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc0&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>100001570: &lt;span style="color:#fabd2f">d37ff90b&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001574: 8&lt;span style="color:#fabd2f">b0b014c&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 11&lt;/span>&lt;span>100001578: 8&lt;span style="color:#fabd2f">b08012d&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 12&lt;/span>&lt;span>10000157&lt;span style="color:#fb4934">c:&lt;/span> 8&lt;span style="color:#fabd2f">b0b01ab&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 13&lt;/span>&lt;span>100001580: &lt;span style="color:#fabd2f">eb0b015f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 14&lt;/span>&lt;span>100001584: &lt;span style="color:#fabd2f">fa4c3122&lt;/span> &lt;span style="color:#d3869b">ccmp&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2, lo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001588: 54000463 &lt;span style="color:#fabd2f">b.lo&lt;/span> &lt;span style="color:#d3869b">0x100001614&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc0&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 16&lt;/span>&lt;span>10000158&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">f100411f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 17&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001590: 54000802 &lt;span style="color:#fabd2f">b.hs&lt;/span> &lt;span style="color:#d3869b">0x100001690&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x13c&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 18&lt;/span>&lt;span>100001594: &lt;span style="color:#fabd2f">d280000b&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 19&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001598: &lt;span style="color:#fabd2f">aa0b03ee&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 20&lt;/span>&lt;span>10000159&lt;span style="color:#fb4934">c:&lt;/span> 927&lt;span style="color:#fabd2f">df10b&lt;/span> &lt;span style="color:#d3869b">and&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xfffffffffffffff8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 21&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">a0:&lt;/span> &lt;span style="color:#fabd2f">d37ff9cd&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 22&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">a4:&lt;/span> 8&lt;span style="color:#fabd2f">b0e01ac&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 23&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">a8:&lt;/span> 8&lt;span style="color:#fabd2f">b0c012c&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 24&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">ac:&lt;/span> 8&lt;span style="color:#fabd2f">b0d014d&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x13&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 25&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">b0:&lt;/span> &lt;span style="color:#fabd2f">cb0b01ce&lt;/span> &lt;span style="color:#d3869b">sub&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 26&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">b4:&lt;/span> 4&lt;span style="color:#fabd2f">f008480&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 27&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">b8:&lt;/span> 4&lt;span style="color:#fabd2f">f008441&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 28&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">bc:&lt;/span> 4&lt;span style="color:#fabd2f">f0087e2&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v2&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 29&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">c0:&lt;/span> 4&lt;span style="color:#fabd2f">f0187e3&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v3&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 30&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">c4:&lt;/span> 0&lt;span style="color:#fabd2f">cdf4184&lt;/span> &lt;span style="color:#d3869b">ld3.8b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x12&lt;/span>], &lt;span style="color:#928374;font-style:italic">#24
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 31&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">c8:&lt;/span> 2&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 32&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">cc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e7&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 33&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">d0:&lt;/span> 2&lt;span style="color:#fabd2f">e251030&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 34&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">d4:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0610&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 35&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">d8:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 36&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">dc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 37&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">e0:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 38&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">e4:&lt;/span> 6&lt;span style="color:#fabd2f">e636e06&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 39&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">e8:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 40&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">ec:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54a5&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 41&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">f0:&lt;/span> 4&lt;span style="color:#fabd2f">f1554c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 42&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">f4:&lt;/span> 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 43&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">f8:&lt;/span> 4&lt;span style="color:#fabd2f">ea41ca4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 44&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">fc:&lt;/span> 3&lt;span style="color:#fabd2f">c8105a4&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x13&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 45&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001600: &lt;span style="color:#fabd2f">b10021ce&lt;/span> &lt;span style="color:#d3869b">adds&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 46&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001604: 54&lt;span style="color:#fabd2f">fffe01&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x1000015c4&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x70&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 47&lt;/span>&lt;span>100001608: &lt;span style="color:#fabd2f">eb0b011f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 48&lt;/span>&lt;span>10000160&lt;span style="color:#fb4934">c:&lt;/span> 54000061 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001618&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc4&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 49&lt;/span>&lt;span>100001610: 1400001&lt;span style="color:#fabd2f">f&lt;/span> &lt;span style="color:#d3869b">b&lt;/span> &lt;span style="color:#d3869b">0x10000168c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x138&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 50&lt;/span>&lt;span>100001614: &lt;span style="color:#fabd2f">d280000b&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 51&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001618: &lt;span style="color:#fabd2f">d37ff96c&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 52&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000161&lt;span style="color:#fb4934">c:&lt;/span> 8&lt;span style="color:#fabd2f">b0c014a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 53&lt;/span>&lt;span>100001620: 8&lt;span style="color:#fabd2f">b0b018c&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 54&lt;/span>&lt;span>100001624: 8&lt;span style="color:#fabd2f">b090189&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 55&lt;/span>&lt;span>100001628: 91000929 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 56&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000162&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">cb0b0108&lt;/span> &lt;span style="color:#d3869b">sub&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 57&lt;/span>&lt;span>100001630: 528003&lt;span style="color:#fabd2f">eb&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">w11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f ; =31
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 58&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001634: 528007&lt;span style="color:#fabd2f">ec&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">w12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f ; =63
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 59&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001638: 385&lt;span style="color:#fabd2f">fe12d&lt;/span> &lt;span style="color:#d3869b">ldurb&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x2]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 60&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000163&lt;span style="color:#fb4934">c:&lt;/span> 385&lt;span style="color:#fabd2f">ff12e&lt;/span> &lt;span style="color:#d3869b">ldurb&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x1]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 61&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001640: 3840352&lt;span style="color:#fabd2f">f&lt;/span> &lt;span style="color:#d3869b">ldrb&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 62&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001644: 110011&lt;span style="color:#fabd2f">ad&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 63&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001648: 53037&lt;span style="color:#fabd2f">dad&lt;/span> &lt;span style="color:#d3869b">lsr&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#928374;font-style:italic">#3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 64&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000164&lt;span style="color:#fb4934">c:&lt;/span> 110009&lt;span style="color:#fabd2f">ce&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 65&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001650: 53027&lt;span style="color:#fabd2f">dce&lt;/span> &lt;span style="color:#d3869b">lsr&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 66&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001654: 110011&lt;span style="color:#fabd2f">ef&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 67&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001658: 53037&lt;span style="color:#fabd2f">def&lt;/span> &lt;span style="color:#d3869b">lsr&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#928374;font-style:italic">#3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 68&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000165&lt;span style="color:#fb4934">c:&lt;/span> 71007&lt;span style="color:#fabd2f">dbf&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 69&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001660: 1&lt;span style="color:#fabd2f">a8b31ad&lt;/span> &lt;span style="color:#d3869b">csel&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w11&lt;/span>, &lt;span style="color:#d3869b">lo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 70&lt;/span>&lt;span>100001664: 7100&lt;span style="color:#fabd2f">fddf&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 71&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001668: 1&lt;span style="color:#fabd2f">a8c31ce&lt;/span> &lt;span style="color:#d3869b">csel&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w12&lt;/span>, &lt;span style="color:#d3869b">lo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 72&lt;/span>&lt;span>10000166&lt;span style="color:#fb4934">c:&lt;/span> 71007&lt;span style="color:#fabd2f">dff&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 73&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001670: 1&lt;span style="color:#fabd2f">a8b31ef&lt;/span> &lt;span style="color:#d3869b">csel&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w11&lt;/span>, &lt;span style="color:#d3869b">lo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 74&lt;/span>&lt;span>100001674: 531&lt;span style="color:#fabd2f">b69ce&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 75&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001678: 2&lt;span style="color:#fabd2f">a0d2dcd&lt;/span> &lt;span style="color:#d3869b">orr&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#928374;font-style:italic">#11
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 76&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000167&lt;span style="color:#fb4934">c:&lt;/span> 2&lt;span style="color:#fabd2f">a0f01ad&lt;/span> &lt;span style="color:#d3869b">orr&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 77&lt;/span>&lt;span>100001680: 7800254&lt;span style="color:#fabd2f">d&lt;/span> &lt;span style="color:#d3869b">strh&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, [&lt;span style="color:#d3869b">x10&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 78&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001684: &lt;span style="color:#fabd2f">f1000508&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 79&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001688: 54&lt;span style="color:#fabd2f">fffd81&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001638&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xe4&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 80&lt;/span>&lt;span>10000168&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">d65f03c0&lt;/span> &lt;span style="color:#d3869b">ret&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 81&lt;/span>&lt;span>100001690: 927&lt;span style="color:#fabd2f">ced0b&lt;/span> &lt;span style="color:#d3869b">and&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xfffffffffffffff0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 82&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001694: 4&lt;span style="color:#fabd2f">f008480&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 83&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001698: 4&lt;span style="color:#fabd2f">f008441&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 84&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000169&lt;span style="color:#fb4934">c:&lt;/span> 4&lt;span style="color:#fabd2f">f0087e2&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v2&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 85&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">a0:&lt;/span> 4&lt;span style="color:#fabd2f">f0187e3&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v3&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 86&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">a4:&lt;/span> &lt;span style="color:#fabd2f">aa0b03ec&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 87&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">a8:&lt;/span> &lt;span style="color:#fabd2f">aa0a03ed&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 88&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">ac:&lt;/span> &lt;span style="color:#fabd2f">aa0903ee&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 89&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">b0:&lt;/span> 4&lt;span style="color:#fabd2f">cdf41c4&lt;/span> &lt;span style="color:#d3869b">ld3.16b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x14&lt;/span>], &lt;span style="color:#928374;font-style:italic">#48
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 90&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">b4:&lt;/span> 6&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 91&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">b8:&lt;/span> 2&lt;span style="color:#fabd2f">e241010&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 92&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">bc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0610&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 93&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">c0:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e7&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 94&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">c4:&lt;/span> 6&lt;span style="color:#fabd2f">e251031&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 95&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">c8:&lt;/span> 2&lt;span style="color:#fabd2f">e251032&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 96&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">cc:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0652&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 97&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">d0:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0631&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 98&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">d4:&lt;/span> 6&lt;span style="color:#fabd2f">e261013&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 99&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">d8:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">100&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">dc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">101&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">e0:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0665&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">102&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">e4:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce6&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">103&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">e8:&lt;/span> 6&lt;span style="color:#fabd2f">e626e07&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">104&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">ec:&lt;/span> 6&lt;span style="color:#fabd2f">e636e30&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">105&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f0:&lt;/span> 6&lt;span style="color:#fabd2f">e636e51&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">106&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f4:&lt;/span> 6&lt;span style="color:#fabd2f">e626ca5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">107&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f8:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">108&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">fc:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54e7&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">109&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001700: 4&lt;span style="color:#fabd2f">f1b54c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">110&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001704: 4&lt;span style="color:#fabd2f">f155631&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">111&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001708: 4&lt;span style="color:#fabd2f">f155610&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">112&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000170&lt;span style="color:#fb4934">c:&lt;/span> 4&lt;span style="color:#fabd2f">ea61e06&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">113&lt;/span>&lt;span>100001710: 4&lt;span style="color:#fabd2f">ea71e27&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">114&lt;/span>&lt;span>100001714: 4&lt;span style="color:#fabd2f">ea41ce4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">115&lt;/span>&lt;span>100001718: 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">116&lt;/span>&lt;span>10000171&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">ac8115a4&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x13&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">117&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001720: &lt;span style="color:#fabd2f">f100418c&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">118&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001724: 54&lt;span style="color:#fabd2f">fffc61&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x1000016b0&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x15c&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">119&lt;/span>&lt;span>100001728: &lt;span style="color:#fabd2f">eb0b011f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">120&lt;/span>&lt;span>10000172&lt;span style="color:#fb4934">c:&lt;/span> 54&lt;span style="color:#fabd2f">fffb00&lt;/span> &lt;span style="color:#d3869b">b.eq&lt;/span> &lt;span style="color:#d3869b">0x10000168c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x138&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">121&lt;/span>&lt;span>100001730: 371&lt;span style="color:#fabd2f">ff348&lt;/span> &lt;span style="color:#d3869b">tbnz&lt;/span> &lt;span style="color:#d3869b">w8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3, 0x100001598 &amp;lt;_rgb888_to_rgb565_scalar+0x44&amp;gt;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">122&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001734: 17&lt;span style="color:#fabd2f">ffffb9&lt;/span> &lt;span style="color:#d3869b">b&lt;/span> &lt;span style="color:#d3869b">0x100001618&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc4&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/details>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a class="link" href="https://developer.arm.com/-/media/Arm%20Developer%20Community/PDF/Neon%20Programmers%20Guide/102159_0104_01_CodingForNeon.pdf?revision=a3235e10-ded9-4ac8-a415-badcafdd56a6" target="_blank" rel="noopener"
>Chapter 8.6.2&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:2">
&lt;p>&lt;a class="link" href="https://developer.arm.com/documentation/102474/0100/Fundamentals-of-Armv8-Neon-technology/Registers--vectors--lanes-and-elements" target="_blank" rel="noopener"
>SIMD Registers&lt;/a>&amp;#160;&lt;a href="#fnref:2" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:3">
&lt;p>&lt;a class="link" href="https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/nice.3.html" target="_blank" rel="noopener"
>The &amp;rsquo;nice&amp;rsquo; interface is obsoleted by &amp;lsquo;setpriority&amp;rsquo;&lt;/a>&amp;#160;&lt;a href="#fnref:3" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;li id="fn:4">
&lt;p>&lt;a class="link" href="https://developer.apple.com/library/archive/documentation/Performance/Conceptual/power_efficiency_guidelines_osx/PrioritizeWorkAtTheTaskLevel.html" target="_blank" rel="noopener"
>Quality of Service settings on macOS&lt;/a>&amp;#160;&lt;a href="#fnref:4" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item><item><title>What Compilers Really Do: A SIMD Case Study</title><link>https://vtbl.dev/posts/what-compilers-really-do/</link><pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate><guid>https://vtbl.dev/posts/what-compilers-really-do/</guid><description>&lt;p>In a &lt;a class="link" href="https://vtbl.dev/posts/simd-algorithm-design/" >different post&lt;/a>, I looked at optimizing a particular algorithm
using Arm Neon SIMD. If you are interested in how to use SIMD to convert RGB888 to RGB565, definitely take
a look at that post.&lt;/p>
&lt;p>While trying different things and figuring out how to reduce the execution time as much as possible,
I did a deep dive into the generated assembly code for different implementations of that algorithm
as well as the code that the compiler generates when optimizing (and vectorizing) the scalar version.&lt;/p>
&lt;p>This post focuses on what I learned about compilers and how to make them do what you want.&lt;/p>
&lt;h1 id="1-compilers-are-really-smart">1. Compilers are really smart
&lt;/h1>&lt;p>Modern compilers are pretty good at optimizing algorithms, at least trivial ones.
They make use of architecture specific instructions to get the most performance out of the target machine.&lt;/p>
&lt;p>When optimizing this simple algorithm for example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">void&lt;/span> &lt;span style="color:#fabd2f">rgb888_to_rgb565_scalar&lt;/span>(Image &lt;span style="color:#fe8019">*&lt;/span>src, Image &lt;span style="color:#fe8019">*&lt;/span>dst) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span> &lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i&lt;span style="color:#fe8019">++&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> r &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> g &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">1&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> b &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer[i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span> &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>];
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// Add half the lost precision before truncating
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> r5 &lt;span style="color:#fe8019">=&lt;/span> (r &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +4 is half of 8 (2^3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> g6 &lt;span style="color:#fe8019">=&lt;/span> (g &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">2&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +2 is half of 4 (2^2)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> b5 &lt;span style="color:#fe8019">=&lt;/span> (b &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">4&lt;/span>) &lt;span style="color:#fe8019">&amp;gt;&amp;gt;&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>; &lt;span style="color:#928374;font-style:italic">// +4 is half of 8 (2^3)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// Clamp to prevent overflow
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> &lt;span style="color:#fe8019">if&lt;/span> (r5 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span> r5 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (g6 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">63&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span> g6 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">63&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span> &lt;span style="color:#fe8019">if&lt;/span> (b5 &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span> b5 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">31&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span> &lt;span style="color:#fabd2f">uint16_t&lt;/span> value &lt;span style="color:#fe8019">=&lt;/span> (&lt;span style="color:#fabd2f">uint16_t&lt;/span>)((r5 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">11&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> (g6 &lt;span style="color:#fe8019">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#d3869b">5&lt;/span>) &lt;span style="color:#fe8019">|&lt;/span> b5);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span> ((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer)[i] &lt;span style="color:#fe8019">=&lt;/span> value;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The compiler essentially generates 3 functions. Or execution paths.
One truly scalar version, one processing 8 pixels per iteration and one processing 16 pixels per iteration.
Since Arm Neon registers are 128 bits wide, 16 8 bit values are the most that can fit into one register.
The whole assembly is in the &lt;a class="link" href="#scalar-algorithm-auto-vectorized" >Appendix&lt;/a>, I just want to draw your attention to
a few small excerpts.&lt;/p>
&lt;p>The following snippet shows the start of the function, and it contains the logic to decide which one of the aforementioned paths it should take.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>0000000100001554 &amp;lt;&lt;span style="color:#fabd2f">_rgb888_to_rgb565_scalar&lt;/span>&amp;gt;:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>100001554: &lt;span style="color:#fabd2f">a9412408&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001558: 9&lt;span style="color:#fabd2f">b087d28&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>10000155&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">b4000988&lt;/span> &lt;span style="color:#d3869b">cbz&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">0x10000168c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x138&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>100001560: &lt;span style="color:#fabd2f">f9400009&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>100001564: &lt;span style="color:#fabd2f">f940002a&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>100001568: &lt;span style="color:#fabd2f">f100211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000156&lt;span style="color:#fb4934">c:&lt;/span> 54000543 &lt;span style="color:#fabd2f">b.lo&lt;/span> &lt;span style="color:#d3869b">0x100001614&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc0&lt;/span>&amp;gt; &lt;span style="color:#928374;font-style:italic">; if num pixel &amp;lt; 8, jump to scalar
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001570: &lt;span style="color:#fabd2f">d37ff90b&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001574: 8&lt;span style="color:#fabd2f">b0b014c&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>100001578: 8&lt;span style="color:#fabd2f">b08012d&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>10000157&lt;span style="color:#fb4934">c:&lt;/span> 8&lt;span style="color:#fabd2f">b0b01ab&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>100001580: &lt;span style="color:#fabd2f">eb0b015f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>100001584: &lt;span style="color:#fabd2f">fa4c3122&lt;/span> &lt;span style="color:#d3869b">ccmp&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2, lo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001588: 54000463 &lt;span style="color:#fabd2f">b.lo&lt;/span> &lt;span style="color:#d3869b">0x100001614&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc0&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>10000158&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">f100411f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001590: 54000802 &lt;span style="color:#fabd2f">b.hs&lt;/span> &lt;span style="color:#d3869b">0x100001690&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x13c&lt;/span>&amp;gt; &lt;span style="color:#928374;font-style:italic">; if num pixel &amp;gt;= jump to 16 pixel at a time
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">// ... continue processing 8 pixels at a time
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="making-the-compiler-do-what-you-want-it-to-do">Making the compiler do what you want it to do
&lt;/h1>&lt;p>If you read my post on using SIMD to solve this problem efficiently, then you know that I have implemented different versions.
Among them one that processes 8 pixels per iteration and one that processes 16 pixels per iteration by loading 3x16 values
and then processing the higher 8 values and lower 8 values separately for each color channel, since it was not possible to keep the algorithm
the same and truly process 16 values with each arithmetic instruction, since the values would overflow.
There is a way to achieve this if you change the algorithm implementation a little, but more on that in
&lt;a class="link" href="https://vtbl.dev/posts/simd-algorithm-design/" >SIMD Algorithm Design: Beyond Basic Vectorization&lt;/a>.&lt;/p>
&lt;p>And the compiler essentially did the same.
In this post, we will only look at the 16 pixel version and ignore the 8 pixel one, since the former is more interesting in my opinion.&lt;/p>
&lt;p>&lt;strong>Before the rest of this post, a short section about terminology:&lt;/strong>&lt;/p>
&lt;p>For the rest of this post I will refer to my &amp;lsquo;16 pixels per iteration&amp;rsquo; implementation as &lt;code>16P&lt;/code> (short for &amp;lsquo;16 pixels version&amp;rsquo;), and
I will refer to the code that the compiler generated when optimizing and vectorizing the scalar version as &lt;code>CGV&lt;/code>, &amp;rsquo;the compiler generated version&amp;rsquo;.&lt;/p>
&lt;p>So when I talk about &amp;rsquo;the assembly generated for 16P&amp;rsquo; or &amp;rsquo;the 16P assembly&amp;rsquo;, then I mean the assembly that the compiler generated when compiling
my handwritten &amp;lsquo;16 pixels per iteration&amp;rsquo; version.
And when I mention &amp;rsquo;the CGV&amp;rsquo;, I refer to the &amp;lsquo;16 pixels at a time&amp;rsquo; part of the compiler generated version,
and &amp;rsquo;the CGV assembly&amp;rsquo; refers to the specific instructions the compiler has generated for CGV.&lt;/p>
&lt;h2 id="comparing-cgv-and-16p">Comparing CGV and 16P
&lt;/h2>&lt;p>So when comparing the 16P assembly and the CGV assembly,
it is clear that the SIMD instructions are exactly the same.
However, benchmarks reveal that CGV is a little bit faster overall.&lt;/p>
&lt;p>So it is worthwhile to look at the loop code generated by the compiler (&lt;a class="link" href="#loop-hand-optimized" >loop of 16P&lt;/a>, &lt;a class="link" href="#loop-auto-vectorized" >loop of CGV&lt;/a>).&lt;/p>
&lt;p>What immediately becomes apparent is that number of instructions for 16P is higher than the number for CGV.
Particularly at the beginning and at the end of the loop.&lt;/p>
&lt;h3 id="beginning-of-the-loop">Beginning of the loop
&lt;/h3>&lt;p>The first ones are right at the beginning of the loop:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f28:&lt;/span> &lt;span style="color:#fabd2f">f940000b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load base address (src-&amp;gt;buffer) from memory
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f2c:&lt;/span> 8&lt;span style="color:#fabd2f">b08016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span> &lt;span style="color:#928374;font-style:italic">; add offset: i * 3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f30:&lt;/span> 4&lt;span style="color:#fabd2f">c404164&lt;/span> &lt;span style="color:#d3869b">ld3.16b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x11&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load 3 times 16 1 byte values from the source address into the registers v4-v6.
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>So for some reason the compiler loads something from memory (source address can be found in &lt;code>x0&lt;/code>) into the register &lt;code>x11&lt;/code>
and adds the content from &lt;code>x8&lt;/code> to it.
The next instruction makes it painfully obvious what this is.
It represents the interleaved load of 16 pixels (3 color channels times 16 1 byte values).&lt;/p>
&lt;p>These 3 lines represent this line from the C code:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>v_rgb888 &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#fabd2f">vld3q_u8&lt;/span>(src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> (i &lt;span style="color:#fe8019">*&lt;/span> &lt;span style="color:#d3869b">3&lt;/span>));
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>x8&lt;/code> contains &lt;code>i * 3&lt;/code> (is set to 0 before the loop code and is later increased by &lt;code>0x30&lt;/code>, which is &lt;code>3 * 16&lt;/code> in hexadecimal,
and &lt;code>i&lt;/code> increases by 16 at each iteration), and the &lt;code>ldr&lt;/code> instruction loads the buffer start address from the &lt;code>src&lt;/code> struct,
which is located in memory.&lt;/p>
&lt;p>This has to be done at each iteration because the compiler doesn&amp;rsquo;t know that the value of &lt;code>buffer&lt;/code> does not change.&lt;/p>
&lt;p>An easy way to avoid this 2 instruction overhead is to save the value of &lt;code>buffer&lt;/code> in a local variable that is placed outside of the loop:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>&lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>src_ptr &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// ...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The next couple of instructions are the same. The order is different, and it is possible that this improves pipelining.
However, this does not cause any measurable performance difference, so it might just be a coincidence.
Furthermore, it is difficult to reason about this without knowing the details of the underlying hardware, which Apple has not made public.
The next difference is at the end of the loop after all the Neon instructions.&lt;/p>
&lt;h3 id="end-of-the-loop">End of the loop
&lt;/h3>&lt;p>The CGV ends with these 3 instructions:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>10000171&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">ac8115a4&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x13&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x20 ; save result to dst-&amp;gt;buffer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001720: &lt;span style="color:#fabd2f">f100418c&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10 ; decrement x12 by 0x10 (16 in decimal)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001724: 54&lt;span style="color:#fabd2f">fffc61&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x1000016b0&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x15c&lt;/span>&amp;gt; &lt;span style="color:#928374;font-style:italic">; branch
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The first instruction saves the computation result back to memory using one instruction to save both buffers to their particular offsets.
The values to be saved are in &lt;code>q4&lt;/code> and &lt;code>q5&lt;/code>, they are saved to the location in &lt;code>x13&lt;/code> and said location is incremented by 32.&lt;/p>
&lt;p>The next 2 instructions decrement the value in &lt;code>x12&lt;/code> by 16 and branch to the start of the loop if that value is not equal to 0.
So what the compiler actually did is convert the for loop to a while loop:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>&lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i&lt;span style="color:#fe8019">++&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// ...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">// to
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>&lt;span style="color:#fabd2f">int&lt;/span> remaining_pixels &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#fe8019">while&lt;/span> (remaining_pixels &lt;span style="color:#fe8019">&amp;gt;&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// ...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span> remaining_pixels &lt;span style="color:#fe8019">-=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Meanwhile, the compiler generated the following instructions for 16P:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f98:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load a value from memory (location in x1 aka dst-&amp;gt;buffer) to x11
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">; ... omitted one neon function that has not yet been exectued, probably due to pipelining
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fa0:&lt;/span> 3&lt;span style="color:#fabd2f">ca96964&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>] &lt;span style="color:#928374;font-style:italic">; store q4 (half of the 16 values) to base address + (2 * i)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fa4:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>] &lt;span style="color:#928374;font-style:italic">; load a value from memory (location in x1 aka dst-&amp;gt;buffer) to x11
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fa8:&lt;/span> 8&lt;span style="color:#fabd2f">b09016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span> &lt;span style="color:#928374;font-style:italic">; x11 = dst-&amp;gt;buffer + (2 * i)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fac:&lt;/span> 3&lt;span style="color:#fabd2f">d800565&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10] ; store q5 into dst-&amp;gt;buffer + (2 * i) + 16
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb0:&lt;/span> 9100414&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10 ; add 16 to x10 (i+=16)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb4:&lt;/span> &lt;span style="color:#fabd2f">a941300b&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10] ; load x0 into x11 and x0 + 16 into x12 (img width and height)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb8:&lt;/span> 9&lt;span style="color:#fabd2f">b0b7d8b&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span> &lt;span style="color:#928374;font-style:italic">; multiply x11 with x12 (num pixels = img-&amp;gt;width * img-&amp;gt;height)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fbc:&lt;/span> 91008129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x20 ; x9 += 32 (16 values * 2 bytes)
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fc0:&lt;/span> 9100&lt;span style="color:#fabd2f">c108&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x30 ; x8 += 48
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fc4:&lt;/span> &lt;span style="color:#fabd2f">eb0a017f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span> &lt;span style="color:#928374;font-style:italic">; compare x11 and x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fc8:&lt;/span> 54&lt;span style="color:#fabd2f">fffb08&lt;/span> &lt;span style="color:#d3869b">b.hi&lt;/span> &lt;span style="color:#d3869b">0x100001f28&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>+&lt;span style="color:#d3869b">0x54&lt;/span>&amp;gt; &lt;span style="color:#928374;font-style:italic">; branch if num_pixels &amp;gt; i
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>What becomes immediately apparent is that there is not &amp;lsquo;store pair&amp;rsquo; (&lt;code>stp&lt;/code>) instruction, but there are 2 &amp;lsquo;store&amp;rsquo; (&lt;code>str&lt;/code>)
instructions instead.
This &lt;code>stp&lt;/code> instruction accepts two SIMD registers as inputs, which makes vectorizing the memory access possible as well.
The addressing to figure out where to store the results is also more complicated, and so is the branching logic.&lt;/p>
&lt;p>Starting with the store operations, here is the corresponding C code:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>, v_rgb565_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>((&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i, v_rgb565_low);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>ldr&lt;/code> pattern should seem familiar, since we encountered the exact same issue at the beginning of the loop,
and the reason as well as the solution is the same here. &lt;code>x1&lt;/code> contains the location of the destination buffer, &lt;code>x9&lt;/code> is
&lt;code>2 * i&lt;/code> (due to 16-bit integer addressing).
The compiler reloads the destination address before every store, which also prevents it to replace those two individual
&lt;code>str&lt;/code> instructions with a more efficient &lt;code>stp&lt;/code> instruction.&lt;/p>
&lt;p>One way to get this &amp;lsquo;store pair&amp;rsquo; instruction is by making the compiler understand that the address does not change:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>dst_ptr &lt;span style="color:#fe8019">=&lt;/span> (&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer &lt;span style="color:#fe8019">+&lt;/span> i;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>(dst_ptr, v_rgb565_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>(dst_ptr &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>, v_rgb565_high);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This yields the following assembly, and as you can see we now have a single store (&lt;code>stp&lt;/code>) instead of two stores (2x &lt;code>str&lt;/code>):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>1000020&lt;span style="color:#fb4934">ac:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>1000020&lt;span style="color:#fb4934">b0:&lt;/span> 8&lt;span style="color:#fabd2f">b09016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>1000020&lt;span style="color:#fb4934">b4:&lt;/span> &lt;span style="color:#fabd2f">ad001564&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>1000020&lt;span style="color:#fb4934">b8:&lt;/span> 9100414&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000020&lt;span style="color:#fb4934">bc:&lt;/span> &lt;span style="color:#fabd2f">a941300b&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000020&lt;span style="color:#fb4934">c0:&lt;/span> 9&lt;span style="color:#fabd2f">b0b7d8b&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>1000020&lt;span style="color:#fb4934">c4:&lt;/span> 91008129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000020&lt;span style="color:#fb4934">c8:&lt;/span> 9100&lt;span style="color:#fabd2f">c108&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x30
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000020&lt;span style="color:#fb4934">cc:&lt;/span> &lt;span style="color:#fabd2f">eb0a017f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>1000020&lt;span style="color:#fb4934">d0:&lt;/span> 54&lt;span style="color:#fabd2f">fffb48&lt;/span> &lt;span style="color:#d3869b">b.hi&lt;/span> &lt;span style="color:#d3869b">0x100002038&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals_sp&lt;/span>+&lt;span style="color:#d3869b">0x54&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>However, the compiler still does not know that the value of &lt;code>dst-&amp;gt;buffer&lt;/code> does not change in between iterations,
so it has to load it in every loop and add the offset.
This is now exactly the same as in the beginning of the loop, and the solution is also the same:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>dst_ptr &lt;span style="color:#fe8019">=&lt;/span> (&lt;span style="color:#fabd2f">uint16_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>)dst&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">uint8_t&lt;/span> &lt;span style="color:#fe8019">*&lt;/span>src_ptr &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>buffer;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>&lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">5&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// ...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This reduces the instructions at the end of the loop from 12 to 7:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>1000021&lt;span style="color:#fb4934">b0:&lt;/span> &lt;span style="color:#fabd2f">ad3f9544&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x10] ; store to dst-&amp;gt;buffer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000021&lt;span style="color:#fb4934">b4:&lt;/span> 91004108 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10 ; i+=16
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000021&lt;span style="color:#fb4934">b8:&lt;/span> &lt;span style="color:#fabd2f">a941300b&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10] ; load image dimensions
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000021&lt;span style="color:#fb4934">bc:&lt;/span> 9&lt;span style="color:#fabd2f">b0b7d8b&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span> &lt;span style="color:#928374;font-style:italic">; calculate number of pixels in image
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000021&lt;span style="color:#fb4934">c0:&lt;/span> 9100814&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x20 ; calculate offset for dst-&amp;gt;buffer for the next iteration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000021&lt;span style="color:#fb4934">c4:&lt;/span> &lt;span style="color:#fabd2f">eb08017f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span> &lt;span style="color:#928374;font-style:italic">; if number pixels &amp;gt; i:
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">7&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000021&lt;span style="color:#fb4934">c8:&lt;/span> 54&lt;span style="color:#fabd2f">fffbe8&lt;/span> &lt;span style="color:#d3869b">b.hi&lt;/span> &lt;span style="color:#d3869b">0x100002144&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals_sp_restrict&lt;/span>+&lt;span style="color:#d3869b">0x58&lt;/span>&amp;gt; &lt;span style="color:#928374;font-style:italic">; branch
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This is still 4 more than the CGV assembly, and to explain that discrepancy we have to examine the looping
behavior.
I already mentioned that the compiler converted the for loop into essentially a while loop, which costs 2 instructions,
while the for loop costs 5.
Part of that is that the inline calculation of the number of pixels could not be optimized by the compiler, so
it loads the image dimensions in every loop.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>&lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> num_pixels &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">&amp;lt;&lt;/span> num_pixels; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// ...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Moving that calculation out of the loop gets rid of the extra load instruction and the multiplication, as these are moved
out of the loop, but it keeps the &lt;code>cmp&lt;/code> and adds a &lt;code>lsr&lt;/code> instruction, which shifts the value in &lt;code>x10&lt;/code> (&lt;code>i&lt;/code>) by 4.
The comparison changed as well:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">c84:&lt;/span> &lt;span style="color:#fabd2f">ad3fc526&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q6&lt;/span>, &lt;span style="color:#d3869b">q17&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x10] ; store to dst-&amp;gt;buffer
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c88:&lt;/span> 9100414&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10 ; i+=16
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c8c:&lt;/span> 91008129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x20 ; calculate offset for dst-&amp;gt;buffer for the next iteration
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c90:&lt;/span> &lt;span style="color:#fabd2f">d344fd4b&lt;/span> &lt;span style="color:#d3869b">lsr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#4 ; i &amp;gt;&amp;gt; 4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c94:&lt;/span> &lt;span style="color:#fabd2f">f1270d7f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x9c3 ; (i &amp;gt;&amp;gt; 4) &amp;lt; 2499?
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c98:&lt;/span> 54&lt;span style="color:#fabd2f">fffc43&lt;/span> &lt;span style="color:#d3869b">b.lo&lt;/span> &lt;span style="color:#d3869b">0x100001c20&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_sp&lt;/span>+&lt;span style="color:#d3869b">0x60&lt;/span>&amp;gt; &lt;span style="color:#928374;font-style:italic">; branch if (i &amp;gt;&amp;gt; 4) &amp;lt; 2499
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>So the compiler still cannot convert it to a while loop like it can in the compiler optimized version.
The reason for that is that the compiler doesn&amp;rsquo;t know that/if the image dimensions are divisible by 16,
but we know that they are in this case (200x200 pixels = 40 000 pixels, divided by 16 = 2 500 iterations).&lt;/p>
&lt;p>However, we can tell the compiler that by changing the comparison from &lt;code>i &amp;lt; num_pixels&lt;/code> to &lt;code>i != num_pixels&lt;/code>.
This lets the compiler know that &lt;code>i&lt;/code> does not surpass the number of pixels.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>&lt;span style="color:#fe8019">const&lt;/span> &lt;span style="color:#fabd2f">int&lt;/span> num_pixels &lt;span style="color:#fe8019">=&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_width &lt;span style="color:#fe8019">*&lt;/span> src&lt;span style="color:#fe8019">-&amp;gt;&lt;/span>img_height;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#fe8019">for&lt;/span> (&lt;span style="color:#fabd2f">int&lt;/span> i &lt;span style="color:#fe8019">=&lt;/span> &lt;span style="color:#d3869b">0&lt;/span>; i &lt;span style="color:#fe8019">!=&lt;/span> num_pixels; i &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">16&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span> &lt;span style="color:#928374;font-style:italic">// ...
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>After that the generated instructions are almost equal to CGV:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">c84:&lt;/span> &lt;span style="color:#fabd2f">ad3fc526&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q6&lt;/span>, &lt;span style="color:#d3869b">q17&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c88:&lt;/span> 91008129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c8c:&lt;/span> &lt;span style="color:#fabd2f">f100414a&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c90:&lt;/span> 54&lt;span style="color:#fabd2f">fffc81&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001c20&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_sp&lt;/span>+&lt;span style="color:#d3869b">0x60&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The only difference is that there is an extra add instruction to compute the next offset that the program should write to.
In CGV that is done as part of the &lt;code>stp&lt;/code> instruction.&lt;/p>
&lt;p>Here is a side by side comparison&lt;sup id="fnref:1">&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref">1&lt;/a>&lt;/sup>:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>opcode&lt;/th>
&lt;th>source 1&lt;/th>
&lt;th>source 2&lt;/th>
&lt;th>destination&lt;/th>
&lt;th>offset&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>stp&lt;/code>&lt;/td>
&lt;td>&lt;code>q4&lt;/code>&lt;/td>
&lt;td>&lt;code>q5&lt;/code>&lt;/td>
&lt;td>&lt;code>[x13]&lt;/code>&lt;/td>
&lt;td>+32 (post-index)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>stp&lt;/code>&lt;/td>
&lt;td>&lt;code>q6&lt;/code>&lt;/td>
&lt;td>&lt;code>q17&lt;/code>&lt;/td>
&lt;td>&lt;code>x9&lt;/code>&lt;/td>
&lt;td>-16 (pre-index)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>So the difference is that in the CGV version both register contents are stored to the address at &lt;code>[x13]&lt;/code>
and then the offset is incremented by 32. So an extra &lt;code>add&lt;/code> instruction is not necessary.&lt;/p>
&lt;p>But for some reason the compiler didn&amp;rsquo;t do this for the 16P version.
In the assembly for 16P the destination address is stored in &lt;code>x9&lt;/code>, the register contents are saved at &lt;code>x9-16&lt;/code> and then the
destination address is incremented by 32 (&lt;code>add x9, x9, #0x20&lt;/code>).&lt;/p>
&lt;p>It is not entirely clear to me why the compiler does it that way.
But one way to get it to generate the same instructions is to change the addressing like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">// from
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>(dst_ptr &lt;span style="color:#fe8019">+&lt;/span> i, v_rgb565_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>(dst_ptr &lt;span style="color:#fe8019">+&lt;/span> i &lt;span style="color:#fe8019">+&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>, v_rgb565_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">4&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">// to
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>(dst_ptr, v_rgb565_low);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">7&lt;/span>&lt;span>dst_ptr &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">8&lt;/span>&lt;span>&lt;span style="color:#fabd2f">vst1q_u16&lt;/span>(dst_ptr, v_rgb565_high);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">9&lt;/span>&lt;span>dst_ptr &lt;span style="color:#fe8019">+=&lt;/span> &lt;span style="color:#d3869b">8&lt;/span>;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>That way the compiler generates the same instructions for both 16P and CGV.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">c80:&lt;/span> &lt;span style="color:#fabd2f">ac814506&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q6&lt;/span>, &lt;span style="color:#d3869b">q17&lt;/span>, [&lt;span style="color:#d3869b">x8&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c84:&lt;/span> &lt;span style="color:#fabd2f">f100414a&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">c88:&lt;/span> 54&lt;span style="color:#fabd2f">fffca1&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001c1c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_sp&lt;/span>+&lt;span style="color:#d3869b">0x5c&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h1 id="conclusion">Conclusion
&lt;/h1>&lt;p>To conclude, we have a looked at a rather simple algorithm that has both been vectorized by hand by the compiler.
During the comparisons there have been several observations made that lead to the following conclusions:&lt;/p>
&lt;ol>
&lt;li>Compilers are really smart&lt;/li>
&lt;/ol>
&lt;p>They might optimize your problem just as well, if not better than you do, at least for trivial problems.
Also doing manual optimizations might end up confusing the compiler, so it can&amp;rsquo;t do its best work.&lt;/p>
&lt;ol start="2">
&lt;li>Be aware what the compiler knows and what it doesn&amp;rsquo;t&lt;/li>
&lt;/ol>
&lt;p>Many of these changes in assembly were because the compiler could not know about the influence of other code on data
and therefore had to play it safe, which resulted in extra instructions and an observable performance penalty.&lt;/p>
&lt;ol start="3">
&lt;li>Pre-calculate what you can&lt;/li>
&lt;/ol>
&lt;p>The compiler does not necessarily move calculations out of a loop, even though the result does not change across iterations.
Moving calculations out of a hot-loop and caching the results can be worth it.
Especially when the calculations are expensive.&lt;/p>
&lt;ol start="4">
&lt;li>Be as expressive as you can be&lt;/li>
&lt;/ol>
&lt;p>Some things that might be obvious to you are not clear to the compiler, and generally the more expressive your code
is, the better the compiler performs when generating the code that eventually runs on the CPU.
However, one or two add instructions might be a worthwhile cost for less verbose/more concise and thereby more readable code.
But if you want to make sure the compiler does the best it can, being more expressive is usually the way to achieve that.&lt;/p>
&lt;hr>
&lt;details id="appendix" >
&lt;summary>Appendix&lt;/summary>
&lt;h3 id="scalar-algorithm-auto-vectorized">Scalar Algorithm (auto vectorized)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>0000000100001554 &amp;lt;&lt;span style="color:#fabd2f">_rgb888_to_rgb565_scalar&lt;/span>&amp;gt;:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>100001554: &lt;span style="color:#fabd2f">a9412408&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001558: 9&lt;span style="color:#fabd2f">b087d28&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>10000155&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">b4000988&lt;/span> &lt;span style="color:#d3869b">cbz&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">0x10000168c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x138&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>100001560: &lt;span style="color:#fabd2f">f9400009&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>100001564: &lt;span style="color:#fabd2f">f940002a&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>100001568: &lt;span style="color:#fabd2f">f100211f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000156&lt;span style="color:#fb4934">c:&lt;/span> 54000543 &lt;span style="color:#fabd2f">b.lo&lt;/span> &lt;span style="color:#d3869b">0x100001614&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc0&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>100001570: &lt;span style="color:#fabd2f">d37ff90b&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001574: 8&lt;span style="color:#fabd2f">b0b014c&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 11&lt;/span>&lt;span>100001578: 8&lt;span style="color:#fabd2f">b08012d&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 12&lt;/span>&lt;span>10000157&lt;span style="color:#fb4934">c:&lt;/span> 8&lt;span style="color:#fabd2f">b0b01ab&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 13&lt;/span>&lt;span>100001580: &lt;span style="color:#fabd2f">eb0b015f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 14&lt;/span>&lt;span>100001584: &lt;span style="color:#fabd2f">fa4c3122&lt;/span> &lt;span style="color:#d3869b">ccmp&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2, lo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001588: 54000463 &lt;span style="color:#fabd2f">b.lo&lt;/span> &lt;span style="color:#d3869b">0x100001614&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc0&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 16&lt;/span>&lt;span>10000158&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">f100411f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 17&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001590: 54000802 &lt;span style="color:#fabd2f">b.hs&lt;/span> &lt;span style="color:#d3869b">0x100001690&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x13c&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 18&lt;/span>&lt;span>100001594: &lt;span style="color:#fabd2f">d280000b&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 19&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001598: &lt;span style="color:#fabd2f">aa0b03ee&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 20&lt;/span>&lt;span>10000159&lt;span style="color:#fb4934">c:&lt;/span> 927&lt;span style="color:#fabd2f">df10b&lt;/span> &lt;span style="color:#d3869b">and&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xfffffffffffffff8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 21&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">a0:&lt;/span> &lt;span style="color:#fabd2f">d37ff9cd&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 22&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">a4:&lt;/span> 8&lt;span style="color:#fabd2f">b0e01ac&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 23&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">a8:&lt;/span> 8&lt;span style="color:#fabd2f">b0c012c&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 24&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">ac:&lt;/span> 8&lt;span style="color:#fabd2f">b0d014d&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x13&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 25&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">b0:&lt;/span> &lt;span style="color:#fabd2f">cb0b01ce&lt;/span> &lt;span style="color:#d3869b">sub&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 26&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">b4:&lt;/span> 4&lt;span style="color:#fabd2f">f008480&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 27&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">b8:&lt;/span> 4&lt;span style="color:#fabd2f">f008441&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 28&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">bc:&lt;/span> 4&lt;span style="color:#fabd2f">f0087e2&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v2&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 29&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">c0:&lt;/span> 4&lt;span style="color:#fabd2f">f0187e3&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v3&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 30&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">c4:&lt;/span> 0&lt;span style="color:#fabd2f">cdf4184&lt;/span> &lt;span style="color:#d3869b">ld3.8b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x12&lt;/span>], &lt;span style="color:#928374;font-style:italic">#24
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 31&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">c8:&lt;/span> 2&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 32&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">cc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e7&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 33&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">d0:&lt;/span> 2&lt;span style="color:#fabd2f">e251030&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 34&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">d4:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0610&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 35&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">d8:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 36&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">dc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 37&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">e0:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 38&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">e4:&lt;/span> 6&lt;span style="color:#fabd2f">e636e06&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 39&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">e8:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 40&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">ec:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54a5&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 41&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">f0:&lt;/span> 4&lt;span style="color:#fabd2f">f1554c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 42&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000015&lt;span style="color:#fb4934">f4:&lt;/span> 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 43&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">f8:&lt;/span> 4&lt;span style="color:#fabd2f">ea41ca4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 44&lt;/span>&lt;span>1000015&lt;span style="color:#fb4934">fc:&lt;/span> 3&lt;span style="color:#fabd2f">c8105a4&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x13&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 45&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001600: &lt;span style="color:#fabd2f">b10021ce&lt;/span> &lt;span style="color:#d3869b">adds&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x8
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 46&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001604: 54&lt;span style="color:#fabd2f">fffe01&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x1000015c4&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x70&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 47&lt;/span>&lt;span>100001608: &lt;span style="color:#fabd2f">eb0b011f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 48&lt;/span>&lt;span>10000160&lt;span style="color:#fb4934">c:&lt;/span> 54000061 &lt;span style="color:#fabd2f">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001618&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc4&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 49&lt;/span>&lt;span>100001610: 1400001&lt;span style="color:#fabd2f">f&lt;/span> &lt;span style="color:#d3869b">b&lt;/span> &lt;span style="color:#d3869b">0x10000168c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x138&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 50&lt;/span>&lt;span>100001614: &lt;span style="color:#fabd2f">d280000b&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x0 ; =0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 51&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001618: &lt;span style="color:#fabd2f">d37ff96c&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 52&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000161&lt;span style="color:#fb4934">c:&lt;/span> 8&lt;span style="color:#fabd2f">b0c014a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 53&lt;/span>&lt;span>100001620: 8&lt;span style="color:#fabd2f">b0b018c&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 54&lt;/span>&lt;span>100001624: 8&lt;span style="color:#fabd2f">b090189&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 55&lt;/span>&lt;span>100001628: 91000929 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 56&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000162&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">cb0b0108&lt;/span> &lt;span style="color:#d3869b">sub&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 57&lt;/span>&lt;span>100001630: 528003&lt;span style="color:#fabd2f">eb&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">w11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f ; =31
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 58&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001634: 528007&lt;span style="color:#fabd2f">ec&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">w12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f ; =63
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 59&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001638: 385&lt;span style="color:#fabd2f">fe12d&lt;/span> &lt;span style="color:#d3869b">ldurb&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x2]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 60&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000163&lt;span style="color:#fb4934">c:&lt;/span> 385&lt;span style="color:#fabd2f">ff12e&lt;/span> &lt;span style="color:#d3869b">ldurb&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#-0x1]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 61&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001640: 3840352&lt;span style="color:#fabd2f">f&lt;/span> &lt;span style="color:#d3869b">ldrb&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, [&lt;span style="color:#d3869b">x9&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 62&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001644: 110011&lt;span style="color:#fabd2f">ad&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 63&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001648: 53037&lt;span style="color:#fabd2f">dad&lt;/span> &lt;span style="color:#d3869b">lsr&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#928374;font-style:italic">#3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 64&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000164&lt;span style="color:#fb4934">c:&lt;/span> 110009&lt;span style="color:#fabd2f">ce&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 65&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001650: 53027&lt;span style="color:#fabd2f">dce&lt;/span> &lt;span style="color:#d3869b">lsr&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 66&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001654: 110011&lt;span style="color:#fabd2f">ef&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 67&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001658: 53037&lt;span style="color:#fabd2f">def&lt;/span> &lt;span style="color:#d3869b">lsr&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#928374;font-style:italic">#3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 68&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000165&lt;span style="color:#fb4934">c:&lt;/span> 71007&lt;span style="color:#fabd2f">dbf&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 69&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001660: 1&lt;span style="color:#fabd2f">a8b31ad&lt;/span> &lt;span style="color:#d3869b">csel&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w11&lt;/span>, &lt;span style="color:#d3869b">lo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 70&lt;/span>&lt;span>100001664: 7100&lt;span style="color:#fabd2f">fddf&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 71&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001668: 1&lt;span style="color:#fabd2f">a8c31ce&lt;/span> &lt;span style="color:#d3869b">csel&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w12&lt;/span>, &lt;span style="color:#d3869b">lo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 72&lt;/span>&lt;span>10000166&lt;span style="color:#fb4934">c:&lt;/span> 71007&lt;span style="color:#fabd2f">dff&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 73&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001670: 1&lt;span style="color:#fabd2f">a8b31ef&lt;/span> &lt;span style="color:#d3869b">csel&lt;/span> &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>, &lt;span style="color:#d3869b">w11&lt;/span>, &lt;span style="color:#d3869b">lo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 74&lt;/span>&lt;span>100001674: 531&lt;span style="color:#fabd2f">b69ce&lt;/span> &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#928374;font-style:italic">#5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 75&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001678: 2&lt;span style="color:#fabd2f">a0d2dcd&lt;/span> &lt;span style="color:#d3869b">orr&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w14&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">lsl&lt;/span> &lt;span style="color:#928374;font-style:italic">#11
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 76&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000167&lt;span style="color:#fb4934">c:&lt;/span> 2&lt;span style="color:#fabd2f">a0f01ad&lt;/span> &lt;span style="color:#d3869b">orr&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w13&lt;/span>, &lt;span style="color:#d3869b">w15&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 77&lt;/span>&lt;span>100001680: 7800254&lt;span style="color:#fabd2f">d&lt;/span> &lt;span style="color:#d3869b">strh&lt;/span> &lt;span style="color:#d3869b">w13&lt;/span>, [&lt;span style="color:#d3869b">x10&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 78&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001684: &lt;span style="color:#fabd2f">f1000508&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 79&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001688: 54&lt;span style="color:#fabd2f">fffd81&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x100001638&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xe4&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 80&lt;/span>&lt;span>10000168&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">d65f03c0&lt;/span> &lt;span style="color:#d3869b">ret&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 81&lt;/span>&lt;span>100001690: 927&lt;span style="color:#fabd2f">ced0b&lt;/span> &lt;span style="color:#d3869b">and&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xfffffffffffffff0
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 82&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001694: 4&lt;span style="color:#fabd2f">f008480&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x4
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 83&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001698: 4&lt;span style="color:#fabd2f">f008441&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 84&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000169&lt;span style="color:#fb4934">c:&lt;/span> 4&lt;span style="color:#fabd2f">f0087e2&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v2&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x1f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 85&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">a0:&lt;/span> 4&lt;span style="color:#fabd2f">f0187e3&lt;/span> &lt;span style="color:#d3869b">movi.8h&lt;/span> &lt;span style="color:#d3869b">v3&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3f
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 86&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">a4:&lt;/span> &lt;span style="color:#fabd2f">aa0b03ec&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 87&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">a8:&lt;/span> &lt;span style="color:#fabd2f">aa0a03ed&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x13&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 88&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">ac:&lt;/span> &lt;span style="color:#fabd2f">aa0903ee&lt;/span> &lt;span style="color:#d3869b">mov&lt;/span> &lt;span style="color:#d3869b">x14&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 89&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">b0:&lt;/span> 4&lt;span style="color:#fabd2f">cdf41c4&lt;/span> &lt;span style="color:#d3869b">ld3.16b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x14&lt;/span>], &lt;span style="color:#928374;font-style:italic">#48
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 90&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">b4:&lt;/span> 6&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 91&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">b8:&lt;/span> 2&lt;span style="color:#fabd2f">e241010&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 92&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">bc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0610&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 93&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">c0:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e7&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 94&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">c4:&lt;/span> 6&lt;span style="color:#fabd2f">e251031&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 95&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">c8:&lt;/span> 2&lt;span style="color:#fabd2f">e251032&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 96&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">cc:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0652&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 97&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">d0:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0631&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 98&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">d4:&lt;/span> 6&lt;span style="color:#fabd2f">e261013&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 99&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">d8:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">100&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">dc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">101&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">e0:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0665&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">102&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">e4:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce6&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">103&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">e8:&lt;/span> 6&lt;span style="color:#fabd2f">e626e07&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">104&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">ec:&lt;/span> 6&lt;span style="color:#fabd2f">e636e30&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">105&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f0:&lt;/span> 6&lt;span style="color:#fabd2f">e636e51&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">106&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f4:&lt;/span> 6&lt;span style="color:#fabd2f">e626ca5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">107&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f8:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">108&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">fc:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54e7&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">109&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001700: 4&lt;span style="color:#fabd2f">f1b54c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">110&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001704: 4&lt;span style="color:#fabd2f">f155631&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">111&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001708: 4&lt;span style="color:#fabd2f">f155610&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">112&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000170&lt;span style="color:#fb4934">c:&lt;/span> 4&lt;span style="color:#fabd2f">ea61e06&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">113&lt;/span>&lt;span>100001710: 4&lt;span style="color:#fabd2f">ea71e27&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">114&lt;/span>&lt;span>100001714: 4&lt;span style="color:#fabd2f">ea41ce4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">115&lt;/span>&lt;span>100001718: 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">116&lt;/span>&lt;span>10000171&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">ac8115a4&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x13&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">117&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001720: &lt;span style="color:#fabd2f">f100418c&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">118&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001724: 54&lt;span style="color:#fabd2f">fffc61&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x1000016b0&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x15c&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">119&lt;/span>&lt;span>100001728: &lt;span style="color:#fabd2f">eb0b011f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">120&lt;/span>&lt;span>10000172&lt;span style="color:#fb4934">c:&lt;/span> 54&lt;span style="color:#fabd2f">fffb00&lt;/span> &lt;span style="color:#d3869b">b.eq&lt;/span> &lt;span style="color:#d3869b">0x10000168c&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x138&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">121&lt;/span>&lt;span>100001730: 371&lt;span style="color:#fabd2f">ff348&lt;/span> &lt;span style="color:#d3869b">tbnz&lt;/span> &lt;span style="color:#d3869b">w8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3, 0x100001598 &amp;lt;_rgb888_to_rgb565_scalar+0x44&amp;gt;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">122&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001734: 17&lt;span style="color:#fabd2f">ffffb9&lt;/span> &lt;span style="color:#d3869b">b&lt;/span> &lt;span style="color:#d3869b">0x100001618&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0xc4&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="loop-auto-vectorized">Loop (auto vectorized)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">b0:&lt;/span> 4&lt;span style="color:#fabd2f">cdf41c4&lt;/span> &lt;span style="color:#d3869b">ld3.16b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x14&lt;/span>], &lt;span style="color:#928374;font-style:italic">#48
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">b4:&lt;/span> 6&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">b8:&lt;/span> 2&lt;span style="color:#fabd2f">e241010&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">bc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0610&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">c0:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e7&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">c4:&lt;/span> 6&lt;span style="color:#fabd2f">e251031&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">c8:&lt;/span> 2&lt;span style="color:#fabd2f">e251032&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">cc:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0652&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">d0:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0631&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">d4:&lt;/span> 6&lt;span style="color:#fabd2f">e261013&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">d8:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">dc:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">e0:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0665&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>1000016&lt;span style="color:#fb4934">e4:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce6&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">e8:&lt;/span> 6&lt;span style="color:#fabd2f">e626e07&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">ec:&lt;/span> 6&lt;span style="color:#fabd2f">e636e30&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f0:&lt;/span> 6&lt;span style="color:#fabd2f">e636e51&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f4:&lt;/span> 6&lt;span style="color:#fabd2f">e626ca5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">f8:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>1000016&lt;span style="color:#fb4934">fc:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54e7&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001700: 4&lt;span style="color:#fabd2f">f1b54c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001704: 4&lt;span style="color:#fabd2f">f155631&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001708: 4&lt;span style="color:#fabd2f">f155610&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>10000170&lt;span style="color:#fb4934">c:&lt;/span> 4&lt;span style="color:#fabd2f">ea61e06&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span>100001710: 4&lt;span style="color:#fabd2f">ea71e27&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span>100001714: 4&lt;span style="color:#fabd2f">ea41ce4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span>100001718: 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>10000171&lt;span style="color:#fb4934">c:&lt;/span> &lt;span style="color:#fabd2f">ac8115a4&lt;/span> &lt;span style="color:#d3869b">stp&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x13&lt;/span>], &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001720: &lt;span style="color:#fabd2f">f100418c&lt;/span> &lt;span style="color:#d3869b">subs&lt;/span> &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001724: 54&lt;span style="color:#fabd2f">fffc61&lt;/span> &lt;span style="color:#d3869b">b.ne&lt;/span> &lt;span style="color:#d3869b">0x1000016b0&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_scalar&lt;/span>+&lt;span style="color:#d3869b">0x15c&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="loop-hand-optimized">Loop (hand optimized)
&lt;/h3>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#ebdbb2;background-color:#282828;-moz-tab-size:2;-o-tab-size:2;tab-size:2;">&lt;code class="language-asm" data-lang="asm">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 1&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f28:&lt;/span> &lt;span style="color:#fabd2f">f940000b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 2&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f2c:&lt;/span> 8&lt;span style="color:#fabd2f">b08016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 3&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f30:&lt;/span> 4&lt;span style="color:#fabd2f">c404164&lt;/span> &lt;span style="color:#d3869b">ld3.16b&lt;/span> { &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span> }, [&lt;span style="color:#d3869b">x11&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 4&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f34:&lt;/span> 6&lt;span style="color:#fabd2f">e241007&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 5&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f38:&lt;/span> 6&lt;span style="color:#fabd2f">e251030&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 6&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f3c:&lt;/span> 6&lt;span style="color:#fabd2f">e261011&lt;/span> &lt;span style="color:#d3869b">uaddw2.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 7&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f40:&lt;/span> 2&lt;span style="color:#fabd2f">e241012&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 8&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f44:&lt;/span> 2&lt;span style="color:#fabd2f">e251033&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#d3869b">v1&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59"> 9&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f48:&lt;/span> 2&lt;span style="color:#fabd2f">e261004&lt;/span> &lt;span style="color:#d3869b">uaddw.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v0&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">10&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f4c:&lt;/span> 6&lt;span style="color:#fabd2f">f1d04e5&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">11&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f50:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0606&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">12&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f54:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0627&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">13&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f58:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0650&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v18&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">14&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f5c:&lt;/span> 6&lt;span style="color:#fabd2f">f1e0671&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v19&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x2
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">15&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f60:&lt;/span> 6&lt;span style="color:#fabd2f">f1d0484&lt;/span> &lt;span style="color:#d3869b">ushr.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x3
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">16&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f64:&lt;/span> 6&lt;span style="color:#fabd2f">e626ca5&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">17&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f68:&lt;/span> 6&lt;span style="color:#fabd2f">e636cc6&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">18&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f6c:&lt;/span> 6&lt;span style="color:#fabd2f">e626ce7&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">19&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f70:&lt;/span> 6&lt;span style="color:#fabd2f">e626e10&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">20&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f74:&lt;/span> 6&lt;span style="color:#fabd2f">e636e31&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v3&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">21&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f78:&lt;/span> 6&lt;span style="color:#fabd2f">e626c84&lt;/span> &lt;span style="color:#d3869b">umin.8h&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v2&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">22&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f7c:&lt;/span> 4&lt;span style="color:#fabd2f">f1b54a5&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">23&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f80:&lt;/span> 4&lt;span style="color:#fabd2f">f1554c6&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">24&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f84:&lt;/span> 4&lt;span style="color:#fabd2f">f1b5610&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0xb
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">25&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f88:&lt;/span> 4&lt;span style="color:#fabd2f">f155631&lt;/span> &lt;span style="color:#d3869b">shl.8h&lt;/span> &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x5
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">26&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">f8c:&lt;/span> 4&lt;span style="color:#fabd2f">ea51cc5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">27&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f90:&lt;/span> 4&lt;span style="color:#fabd2f">eb01e26&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v17&lt;/span>, &lt;span style="color:#d3869b">v16&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">28&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f94:&lt;/span> 4&lt;span style="color:#fabd2f">ea41cc4&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v4&lt;/span>, &lt;span style="color:#d3869b">v6&lt;/span>, &lt;span style="color:#d3869b">v4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">29&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f98:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">30&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">f9c:&lt;/span> 4&lt;span style="color:#fabd2f">ea71ca5&lt;/span> &lt;span style="color:#d3869b">orr.16b&lt;/span> &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v5&lt;/span>, &lt;span style="color:#d3869b">v7&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">31&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fa0:&lt;/span> 3&lt;span style="color:#fabd2f">ca96964&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q4&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">32&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fa4:&lt;/span> &lt;span style="color:#fabd2f">f940002b&lt;/span> &lt;span style="color:#d3869b">ldr&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, [&lt;span style="color:#d3869b">x1&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">33&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fa8:&lt;/span> 8&lt;span style="color:#fabd2f">b09016b&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">34&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fac:&lt;/span> 3&lt;span style="color:#fabd2f">d800565&lt;/span> &lt;span style="color:#d3869b">str&lt;/span> &lt;span style="color:#d3869b">q5&lt;/span>, [&lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">35&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb0:&lt;/span> 9100414&lt;span style="color:#fabd2f">a&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">36&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb4:&lt;/span> &lt;span style="color:#fabd2f">a941300b&lt;/span> &lt;span style="color:#d3869b">ldp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, [&lt;span style="color:#d3869b">x0&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x10]
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">37&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fb8:&lt;/span> 9&lt;span style="color:#fabd2f">b0b7d8b&lt;/span> &lt;span style="color:#d3869b">mul&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x12&lt;/span>, &lt;span style="color:#d3869b">x11&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">38&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fbc:&lt;/span> 91008129 &lt;span style="color:#fabd2f">add&lt;/span> &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#d3869b">x9&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x20
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">39&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fc0:&lt;/span> 9100&lt;span style="color:#fabd2f">c108&lt;/span> &lt;span style="color:#d3869b">add&lt;/span> &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#d3869b">x8&lt;/span>, &lt;span style="color:#928374;font-style:italic">#0x30
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">40&lt;/span>&lt;span>&lt;span style="color:#928374;font-style:italic">&lt;/span>100001&lt;span style="color:#fb4934">fc4:&lt;/span> &lt;span style="color:#fabd2f">eb0a017f&lt;/span> &lt;span style="color:#d3869b">cmp&lt;/span> &lt;span style="color:#d3869b">x11&lt;/span>, &lt;span style="color:#d3869b">x10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#756d59">41&lt;/span>&lt;span>100001&lt;span style="color:#fb4934">fc8:&lt;/span> 54&lt;span style="color:#fabd2f">fffb08&lt;/span> &lt;span style="color:#d3869b">b.hi&lt;/span> &lt;span style="color:#d3869b">0x100001f28&lt;/span> &amp;lt;&lt;span style="color:#d3869b">_rgb888_to_rgb565_neon_16_vals&lt;/span>+&lt;span style="color:#d3869b">0x54&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/details>
&lt;div class="footnotes" role="doc-endnotes">
&lt;hr>
&lt;ol>
&lt;li id="fn:1">
&lt;p>&lt;a class="link" href="https://developer.arm.com/documentation/dui0801/f/A64-Data-Transfer-Instructions/STP--SIMD-and-FP-" target="_blank" rel="noopener"
>STP Documentation&lt;/a>&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink">&amp;#x21a9;&amp;#xfe0e;&lt;/a>&lt;/p>
&lt;/li>
&lt;/ol>
&lt;/div></description></item></channel></rss>