Getting your code to load and play animated GIFs is a struggle a lot of new coders go through. It is also a topic that is heavily discussed between developers. This blog will show you a few methods that may be a solution you are looking for. This is part 2 of a 3 part series showing you 3 different ways to load animated GIFs.
Find an animated GIF and in my code examples switch your animated GIF filename with the filename I use in the code, gif betty boop glitter 108.gif. Store your GIF file in your Eclipse ASSET folder. Be sure you do this or these code examples will not work for you.
This time we will be using a new class called GifDecoder which you can download here.GifDecoder estracts the frames from the stream allowing us to use it. Place the GifDecoder file within your project src package.
Now create a new class which inherits from ImageView.But it also needs a constructor with a Context and an InputStream. We did this in part 1 of this series, but this time we will be calling the playGif(InputStream) method, as you can see we are passing it our InputStream.
Our class needs five variables.
playGif(InputStream) needs to have mGifDecoder initialized and then it will read our stream that we set as mIsPlayingGif.
Now we are going to break down our thread a bit. We will count the frames of our animation and how many times to repeat. When GifDecoder,getLoopCount() returns a 0 we know that we should play the GIF forever. GifDecoder and getFrame() are going to work hand-in-hand by trasnferring the Bitmaps images and then we will post the new Bitmap using Handler and Runnable.
The only thing left to do now is use GifDecoderView in an Activity just like we did in Part 1 of this series.
This bad boy is going to eat up a lot of memory, so don't say I didn't warn you. Always call recycle() on every Bitmap you don't need anymore. For older devices that used native heap instead of the Dalvik VM heap this method will be a big strain when used with heavy GIF files.


//
//  task-schedule-test.h
//  Residue
//
//  Copyright 2017-present Amrayn Web Services
//  https://amrayn.com
//
//  Author: @abumusamq
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

#ifndef TASK_SCHEDULE_TEST_H
#define TASK_SCHEDULE_TEST_H

#include "test.h"

#include "tasks/task.h"
#include "utils/utils.h"

using namespace residue;

class SimpleTask final : public Task
{
public:
    explicit SimpleTask(unsigned int interval) :
        Task("SimpleTask", nullptr, interval)
    {
    }

    virtual void execute() override
    {
        LOG(INFO) << "SimpleTask::execute()";
    }
};

TEST(TaskScheduleTest, TestBasicSchedule)
{
    const types::Time now = Utils::now();
    int interv = 20;
    SimpleTask t(interv);
    t.rescheduleFrom(now);
    ASSERT_EQ(now + interv, t.nextExecution());
    ASSERT_EQ(interv, t.intervalCount());
}

#endif // TASK_SCHEDULE_TEST_H


You have a long fence which consists of $$$n$$$ sections. Unfortunately, it is not painted, so you decided to hire $$$q$$$ painters to paint it. $$$i$$$-th painter will paint all sections $$$x$$$ such that $$$l_i \le x \le r_i$$$.

Unfortunately, you are on a tight budget, so you may hire only $$$q - 2$$$ painters. Obviously, only painters you hire will do their work.

You want to maximize the number of painted sections if you choose $$$q - 2$$$ painters optimally. A section is considered painted if at least one painter paints it.


Adwind is a trojan (also known as jRAT, AlienSpy, JSocket, and Sockrat) is targeting the utilities sector via malspam that uses URL redirection to deliver malicious payloads. The embedded image in the email contains a malicious URL and is camouflaged as a PDF attachment. Adwind can record video and sound, snap photos using the infected machine's webcam, mine for cryptocurrency, and harvest cryptocurrency wallet information. It is distributed to threat actors as a malware-as-a-service (or MaaS) and can evade detection by most anti-malware solutions.
Bleeping Computer provides technical analysis on the Adwind trojan, available here.


Maybe not the sexiest designed diagram, but a nice one to keep in the collection.
About this blog
I'm Samuel Ericson, a Swedish interaction designer. I use this space to share links, thoughts and ideas or whatever I stumble across in the design sphere.
My Bettin.gs stats
ROI Profit +1.762% 726.47 Units Placed bets Won bets 11349 3731 (34%) Top sport Top bookie Horse Racing Betfair
Full stats → Bettin.gs/samuelericson


It is winter now, and Max decided it's about time he watered the garden.

The garden can be represented as n consecutive garden beds, numbered from 1 to n. k beds contain water taps (i-th tap is located in the bed xi), which, if turned on, start delivering water to neighbouring beds. If the tap on the bed xi is turned on, then after one second has passed, the bed xi will be watered; after two seconds have passed, the beds from the segment [xi - 1, xi + 1] will be watered (if they exist); after j seconds have passed (j is an integer number), the beds from the segment [xi - (j - 1), xi + (j - 1)] will be watered (if they exist). Nothing changes during the seconds, so, for example, we can't say that the segment [xi - 2.5, xi + 2.5] will be watered after 2.5 seconds have passed; only the segment [xi - 2, xi + 2] will be watered at that moment.

The garden from test 1. White colour denotes a garden bed without a tap, red colour — a garden bed with a tap.

The garden from test 1 after 2 seconds have passed after turning on the tap. White colour denotes an unwatered garden bed, blue colour — a watered bed.

Max wants to turn on all the water taps at the same moment, and now he wonders, what is the minimum number of seconds that have to pass after he turns on some taps until the whole garden is watered. Help him to find the answer!


What joy! Petya's parents went on a business trip for the whole year and the playful kid is left all by himself. Petya got absolutely happy. He jumped on the bed and threw pillows all day long, until...

Today Petya opened the cupboard and found a scary note there. His parents had left him with duties: he should water their favourite flower all year, each day, in the morning, in the afternoon and in the evening. "Wait a second!" — thought Petya. He know for a fact that if he fulfills the parents' task in the i-th (1 ≤ i ≤ 12) month of the year, then the flower will grow by ai centimeters, and if he doesn't water the flower in the i-th month, then the flower won't grow this month. Petya also knows that try as he might, his parents won't believe that he has been watering the flower if it grows strictly less than by k centimeters.

Help Petya choose the minimum number of months when he will water the flower, given that the flower should grow no less than by k centimeters.


well...kind of an Easter Egg , but attempt this at your own risk, the worst it could happen is a corrupt kaura.cfg file before you attempt this, there must be NO nds file in the root directory of your microsd, doing this trick in any other directory will corrupt your kaura.cfg file 1. add a game to the bottom box if there wasn't any, by clicking on the NDS Icon , choose a game and push Y 2. when you have a game listed on the bottom box of the Main Menu, click on the NDS Icon and goto the Root Directory by choosing the "Folder with Arrow icon" until you are at the root (where you see the SYSTEM folder), it should say "File Not Found" on the screen there is a fast (3a) way and a slow (3b) way of clearing the bottom box 3a. push the shoulder R button and the blue bracket will appear on the bottom left corner of the screen with some ? marks, next push the Y button and wait like 20 seconds and it'll automatically return to the Main Menu with an empty Bottom Box. 3b. push the shoulder L button, then push the Y button and wait like 50 seconds and it'll automatically return to the Main Menu with an empty Bottom Box.


help me with the down load please!
ok guys... i want to ask about downloading chapters in school rumble..
the problem is ..
i couldn't download any chapter at all for school rumble's series..
as for other series i can download it whithout diddiculties..
i already asked the mod about this.. but still threre is still no answer,,
i would aprreciate any help from anyone of u to help me..
oh yeah' my modem is the latest, and my internet connection is good too.
so i can't find the problem..
does anybody has a argument bout thiss?
for boys, girls are everything..
and they''ll do anything to get
the girl..even for the last drop of their blood


By Emre Caglar Hosgor, SOC Analyst—Specially for Belkasoft
Incident Response (IR) involves processes and technology for detecting and responding to cyber threats before, during, or after an incident. IR is an essential component of defensive cyber security. When we look at the chronological improvements, we see that the 1990s were the era of protection. By the 2000s, detection had gained importance. Recently, we have been aiming to combine protection, detection, and response against attacks. Computer forensics has followed a similar trend. In the 1990s, forensic investigation focused on protecting data and detecting cyber incidents. By the 2010s, response to events, root cause detection, and timeline analysis gained importance in Computer Forensics. All of these are essential parts of IR.
This article series will cover essential artifacts for IR and the use of Belkasoft Evidence Center X (hereinafter "Belkasoft X") by an incident responder. The first IR-related artifact to be discussed is the Windows event log files. Let us start with the structure of the artifact and computer forensic analysis for event logs.
What are Windows Event Files
In the Windows operating system, software and hardware incidents, errors, and bugs are stored in a central location that Microsoft refers to as an event log. The Event Viewer is the appropriate program to view default events in Windows OS.
Event logging mechanisms in Windows are structured into five major categories:
- Audit Success/Failure
The configurations are in the Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog registry key. This key contains subkeys for each configurable item in the event logging mechanism. For instance, the Computer\HKLM\SYSTEM\CurrentControlSet\Services EventLog\Application\Edge key is the configuration of the logging mechanism for the Microsoft Edge Browser. You can see the details of the registry structure of the logging mechanism on a Windows 11 machine in Figure 1:
Figure 1. EventLog key in Window Server 2022
In addition to the keys above, domain controllers have DNS, Directory Service, and File Replication logs by default. Each EventLog key contains subkeys for event sources. The application event log is the most customizable, and the security and system are the least customizable event logs. For IR, the security event logs are the essential sources.
You can access and review Windows event log details using the Event Viewer application. By default, Event Viewer log files use the .evt or.evtx extension and are located in the C:\Windows\System32\winevt\Logs. However, you can move the log files to another location by using the Event Viewer or by specifying another default location in the Registry Editor.
The location of Windows event log files on Windows servers can vary depending on the version of Windows Server. For example, on Windows Server 2016, log files can be found in the C:\Windows\System32\winevt\logs folder. On other versions of Windows Server, you may find log files in a different location.
The locations for Windows event log files are:
- Windows Server 2019: C:\Windows\System32\winevt\logs
- Windows Server 2012 R2: C:\Windows\System32\winevt\logs
- Windows Server 2008 R2: C:\Windows\System32\winevt\logs
- Windows Server 2003: C:\Windows\System32\config
Event Logs for Incident Response
Event logs for incident response, by default, originate from security events. Only Local Security Authority (Lsass.exe) has permission to write security events. Security events can be structured via local or domain group policies. User account-related privilege escalation events are default logged under the security events. For the sake of brevity of the discussion, we will go over the essential event IDs about IR and Computer Forensics in security event logs. The detailed list can be found at the following link.
The most common security events are listed in Table 1:
|A service was installed in the system
|A scheduled task was created
|A scheduled task was deleted
|A scheduled task was updated
|A new service is created on the local Windows machine.
|The service terminated unexpectedly
|Whenever Windows Security audit log is cleared, event ID 1102 is logged
|This event is logged when the log file was cleared
|The domain controller attempted to validate the credentials for an account
|Kerberos pre-authentication failed
|A Kerberos authentication ticket (TGT) was requested
|An account was successfully logged on
|An account failed to log on
|User initiated logoff, an account was logged off
|A logon was attempted using explicit credentials
|Special privileges assigned to new logon
|A user account was created
|A user account was enabled
|An attempt was made to reset an accounts password
|4728, 4732, 4756
|Group membership changes
|A network share object was accessed
|Network share object was checked to see whether the client can be granted desired access
How to Analyze Event Files with Belkasoft X
Belkasoft X can analyze event logs in detail. First, whilst adding a data source, you should select System event log artifact (or just select all supported artifacts):
Figure 2. Adding Event Logs in Belkasoft X
Note that this will not only schedule searching for .evt and .evtx files but will also carve them, in case you selected carving for the data source analysis on the previous page of the Add data source sequence.
Once the analysis is completed, you can see the stats on every artifact, including event logs, on the dashboard. By clicking on the "System event logs", you can quickly start analyzing the events collected, parsed, and generated from the image. Figure 3 shows the dashboard after a successful analysis of the event logs:
Figure 3. Dashboard View After Adding the Data Source to Belkasoft X
For a detailed review, you can open the Artifacts window of the product and navigate to the System event logs node. Figure 4 shows the event details on the Artifacts window:
Figure 4. Analyzing Event Logs using Belkasoft X
Belkasoft X can filter events by various criteria, including Event ID, Security ID, Event type and time, source, and others. During an IR, those filtering options are vital to focus on only relevant events since a typical event log contains thousands, if not tens of thousands, of records.
The Windows Event Log is one of the most important data sources for incident response. There are a number of standard log files, as well as custom event log types, which you can expect inside a Windows device. Depending on the Windows version, event logs are stored in .evt or .evtx files.
Belkasoft X allows to extract, carve, analyze and visualize event details on a target system during a cyber incident response. A set of basic filters helps you to decrease the number of events to analyze. This article gives you a hint of which event numbers you might be interested in. For the following articles we continue our computer forensic focused IR journey. We are going to dive deep into logging mechanisms, detection methods, incorporating SIGMA and YARA rules into DFIR and many more.


// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

#ifndef __ST_PPL_KERNEL_X86_FP32_CONV2D_GEMM_DIRECT_AVX512_CONV2D_N16CX_GEMM_DIRECT_BLK1X31_KERNEL_FP32_AVX512_H_
#define __ST_PPL_KERNEL_X86_FP32_CONV2D_GEMM_DIRECT_AVX512_CONV2D_N16CX_GEMM_DIRECT_BLK1X31_KERNEL_FP32_AVX512_H_

#include <immintrin.h>

#include "ppl/kernel/x86/fp32/conv2d/gemm_direct/avx512/conv2d_n16cx_gemm_direct_kernel_fp32_avx512.h"

namespace ppl { namespace kernel { namespace x86 {

#ifdef PPL_USE_X86_INLINE_ASM

template <bool nt_store, int32_t hw_len>
void conv2d_n16cx_gemm_direct_fp32_avx512_blk1x31_kernel_core(
    const int64_t *priv_param,
    const int64_t *shar_param)
{
    float six[1] = {6.0f};
    __asm__ __volatile__ (
        ".equ P_BYTES, 8\n"
        ".equ D_BYTES, 4\n"

        ".equ CH_DT_BLK, 16\n"

        ".equ SRC_IDX,  (0 * P_BYTES)\n"
        ".equ HIS_IDX,  (1 * P_BYTES)\n"
        ".equ DST_IDX,  (2 * P_BYTES)\n"
        ".equ FLT_IDX,  (3 * P_BYTES)\n"
        ".equ BIAS_IDX, (4 * P_BYTES)\n"
        ".equ HW_IDX,   (5 * P_BYTES)\n"

        ".equ CHANNELS_IDX, (0 * P_BYTES)\n"
        ".equ SRC_ICB_STRIDE_IDX, (1 * P_BYTES)\n"
        ".equ HIS_OCB_STRIDE_IDX, (2 * P_BYTES)\n"
        ".equ DST_OCB_STRIDE_IDX, (3 * P_BYTES)\n"
        ".equ FLT_OCB_STRIDE_IDX, (4 * P_BYTES)\n"
        ".equ FLAGS_IDX, (5 * P_BYTES)\n"

        ".equ NT_STORE, %c[NT_STORE]\n"
        ".equ HW_LEN, %c[HW_LEN]\n"
        ".equ KERNEL_FLAG_LD_BIAS, %c[KERNEL_FLAG_LD_BIAS]\n"
        ".equ KERNEL_FLAG_AD_BIAS, %c[KERNEL_FLAG_AD_BIAS]\n"
        ".equ KERNEL_FLAG_RELU, %c[KERNEL_FLAG_RELU]\n"
        ".equ KERNEL_FLAG_RELU6, %c[KERNEL_FLAG_RELU6]\n"

        "mov SRC_ICB_STRIDE_IDX(%[shar_param]), %%r8\n"
        "mov FLAGS_IDX(%[shar_param]), %%r11\n"
        "mov SRC_IDX(%[priv_param]), %%r12\n"
        "mov HIS_IDX(%[priv_param]), %%r13\n"
        "mov DST_IDX(%[priv_param]), %%r14\n"
        "mov HW_IDX(%[priv_param]), %%r15\n"
"1:\n" // label_init_session
        "test $KERNEL_FLAG_LD_BIAS, %%r11\n"
        "jz 2f\n" // label_load_h
        "mov BIAS_IDX(%[priv_param]), %%r10\n"
        ".if HW_LEN > 0\n vmovups (0 * CH_DT_BLK * D_BYTES)(%%r10), %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vmovaps %%zmm0, %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vmovaps %%zmm0, %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vmovaps %%zmm0, %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vmovaps %%zmm0, %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vmovaps %%zmm0, %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vmovaps %%zmm0, %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vmovaps %%zmm0, %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vmovaps %%zmm0, %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vmovaps %%zmm0, %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vmovaps %%zmm0, %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vmovaps %%zmm0, %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vmovaps %%zmm0, %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vmovaps %%zmm0, %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vmovaps %%zmm0, %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vmovaps %%zmm0, %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vmovaps %%zmm0, %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vmovaps %%zmm0, %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vmovaps %%zmm0, %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vmovaps %%zmm0, %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vmovaps %%zmm0, %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vmovaps %%zmm0, %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vmovaps %%zmm0, %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vmovaps %%zmm0, %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vmovaps %%zmm0, %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vmovaps %%zmm0, %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vmovaps %%zmm0, %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vmovaps %%zmm0, %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vmovaps %%zmm0, %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vmovaps %%zmm0, %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vmovaps %%zmm0, %%zmm30\n .endif\n"
        "jmp 3f\n" // label_load_h_end
"2:\n" // label_load_h
        ".if HW_LEN > 0\n vmovups (0 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vmovups (1 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vmovups (2 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vmovups (3 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vmovups (4 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vmovups (5 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vmovups (6 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vmovups (7 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vmovups (8 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vmovups (9 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vmovups (10 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vmovups (11 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vmovups (12 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vmovups (13 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vmovups (14 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vmovups (15 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vmovups (16 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vmovups (17 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vmovups (18 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vmovups (19 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vmovups (20 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vmovups (21 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vmovups (22 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vmovups (23 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vmovups (24 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vmovups (25 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vmovups (26 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vmovups (27 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vmovups (28 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vmovups (29 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vmovups (30 * CH_DT_BLK * D_BYTES)(%%r13), %%zmm30\n .endif\n"
"3:\n" // label_load_h_end
        "test $KERNEL_FLAG_AD_BIAS, %%r11\n"
        "jz 4f\n" // label_compute_session
        "mov BIAS_IDX(%[priv_param]), %%r10\n"
        "vmovups (0 * CH_DT_BLK * D_BYTES)(%%r10), %%zmm31\n"
        ".if HW_LEN > 0\n vaddps %%zmm31, %%zmm0, %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vaddps %%zmm31, %%zmm1, %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vaddps %%zmm31, %%zmm2, %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vaddps %%zmm31, %%zmm3, %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vaddps %%zmm31, %%zmm4, %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vaddps %%zmm31, %%zmm5, %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vaddps %%zmm31, %%zmm6, %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vaddps %%zmm31, %%zmm7, %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vaddps %%zmm31, %%zmm8, %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vaddps %%zmm31, %%zmm9, %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vaddps %%zmm31, %%zmm10, %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vaddps %%zmm31, %%zmm11, %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vaddps %%zmm31, %%zmm12, %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vaddps %%zmm31, %%zmm13, %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vaddps %%zmm31, %%zmm14, %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vaddps %%zmm31, %%zmm15, %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vaddps %%zmm31, %%zmm16, %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vaddps %%zmm31, %%zmm17, %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vaddps %%zmm31, %%zmm18, %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vaddps %%zmm31, %%zmm19, %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vaddps %%zmm31, %%zmm20, %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vaddps %%zmm31, %%zmm21, %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vaddps %%zmm31, %%zmm22, %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vaddps %%zmm31, %%zmm23, %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vaddps %%zmm31, %%zmm24, %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vaddps %%zmm31, %%zmm25, %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vaddps %%zmm31, %%zmm26, %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vaddps %%zmm31, %%zmm27, %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vaddps %%zmm31, %%zmm28, %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vaddps %%zmm31, %%zmm29, %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vaddps %%zmm31, %%zmm30, %%zmm30\n .endif\n"

"4:\n" // label_compute_session
        "mov %%r12, %%rax\n"
        "mov FLT_IDX(%[priv_param]), %%rbx\n"
        "mov CHANNELS_IDX(%[shar_param]), %%r10\n"
        "cmp $CH_DT_BLK, %%r10\n"
        "jl 6f\n" // label_ic_remain
"5:\n" // label_ic_body
        ".align 16\n"
        ".if HW_LEN < 9\n"
        ".irp IC,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15\n"
        "vmovups (\\IC * CH_DT_BLK * D_BYTES)(%%rbx), %%zmm31\n"
        ".if HW_LEN > 7\n prefetcht0 ((\\IC * CH_DT_BLK + CH_DT_BLK * CH_DT_BLK) * D_BYTES)(%%rbx)\n .endif\n"
        ".if HW_LEN > 0\n vfmadd231ps ((\\IC + 0 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vfmadd231ps ((\\IC + 1 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vfmadd231ps ((\\IC + 2 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vfmadd231ps ((\\IC + 3 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vfmadd231ps ((\\IC + 4 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vfmadd231ps ((\\IC + 5 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vfmadd231ps ((\\IC + 6 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vfmadd231ps ((\\IC + 7 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vfmadd231ps ((\\IC + 8 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vfmadd231ps ((\\IC + 9 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vfmadd231ps ((\\IC + 10 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vfmadd231ps ((\\IC + 11 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vfmadd231ps ((\\IC + 12 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vfmadd231ps ((\\IC + 13 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vfmadd231ps ((\\IC + 14 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vfmadd231ps ((\\IC + 15 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vfmadd231ps ((\\IC + 16 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vfmadd231ps ((\\IC + 17 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vfmadd231ps ((\\IC + 18 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vfmadd231ps ((\\IC + 19 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vfmadd231ps ((\\IC + 20 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vfmadd231ps ((\\IC + 21 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vfmadd231ps ((\\IC + 22 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vfmadd231ps ((\\IC + 23 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vfmadd231ps ((\\IC + 24 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vfmadd231ps ((\\IC + 25 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vfmadd231ps ((\\IC + 26 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vfmadd231ps ((\\IC + 27 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vfmadd231ps ((\\IC + 28 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vfmadd231ps ((\\IC + 29 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vfmadd231ps ((\\IC + 30 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm30\n .endif\n"
        ".endr\n"
        "lea (CH_DT_BLK * CH_DT_BLK * D_BYTES)(%%rbx), %%rbx\n"
        "lea (%%rax, %%r8, D_BYTES), %%rax\n"
        ".else\n" // .if HW_LEN < 9
        "mov $CH_DT_BLK, %%r9\n"
"9:\n" // label_ic
        "vmovups (0 * CH_DT_BLK * D_BYTES)(%%rbx), %%zmm31\n"
        "prefetcht0 ((0 * CH_DT_BLK + CH_DT_BLK * CH_DT_BLK) * D_BYTES)(%%rbx)\n"
        "lea (CH_DT_BLK * D_BYTES)(%%rbx), %%rbx\n"
        ".if HW_LEN > 0\n vfmadd231ps ((0 + 0 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vfmadd231ps ((0 + 1 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vfmadd231ps ((0 + 2 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vfmadd231ps ((0 + 3 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vfmadd231ps ((0 + 4 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vfmadd231ps ((0 + 5 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vfmadd231ps ((0 + 6 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vfmadd231ps ((0 + 7 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vfmadd231ps ((0 + 8 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vfmadd231ps ((0 + 9 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vfmadd231ps ((0 + 10 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vfmadd231ps ((0 + 11 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vfmadd231ps ((0 + 12 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vfmadd231ps ((0 + 13 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vfmadd231ps ((0 + 14 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vfmadd231ps ((0 + 15 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vfmadd231ps ((0 + 16 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vfmadd231ps ((0 + 17 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vfmadd231ps ((0 + 18 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vfmadd231ps ((0 + 19 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vfmadd231ps ((0 + 20 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vfmadd231ps ((0 + 21 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vfmadd231ps ((0 + 22 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vfmadd231ps ((0 + 23 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vfmadd231ps ((0 + 24 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vfmadd231ps ((0 + 25 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vfmadd231ps ((0 + 26 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vfmadd231ps ((0 + 27 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vfmadd231ps ((0 + 28 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vfmadd231ps ((0 + 29 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vfmadd231ps ((0 + 30 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm30\n .endif\n"
        "lea D_BYTES(%%rax), %%rax\n"
        "sub $1, %%r9\n"
        "cmp $0, %%r9\n"
        "jne 9b\n" // label_ic
        "lea (-CH_DT_BLK * D_BYTES)(%%rax, %%r8, D_BYTES), %%rax\n"
        ".endif\n" // .if HW_LEN < 9
        "sub $CH_DT_BLK, %%r10\n"
        "cmp $CH_DT_BLK, %%r10\n"
        "jge 5b\n"// label_ic_body
        "cmp $0, %%r10\n"
        "je 7f\n" // label_finalize_session
"6:\n" // label_ic_remain
        "vmovups (0 * CH_DT_BLK * D_BYTES)(%%rbx), %%zmm31\n"
        "lea (CH_DT_BLK * D_BYTES)(%%rbx), %%rbx\n"
        ".if HW_LEN > 0\n vfmadd231ps ((0 + 0 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vfmadd231ps ((0 + 1 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vfmadd231ps ((0 + 2 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vfmadd231ps ((0 + 3 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vfmadd231ps ((0 + 4 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vfmadd231ps ((0 + 5 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vfmadd231ps ((0 + 6 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vfmadd231ps ((0 + 7 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vfmadd231ps ((0 + 8 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vfmadd231ps ((0 + 9 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vfmadd231ps ((0 + 10 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vfmadd231ps ((0 + 11 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vfmadd231ps ((0 + 12 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vfmadd231ps ((0 + 13 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vfmadd231ps ((0 + 14 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vfmadd231ps ((0 + 15 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vfmadd231ps ((0 + 16 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vfmadd231ps ((0 + 17 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vfmadd231ps ((0 + 18 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vfmadd231ps ((0 + 19 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vfmadd231ps ((0 + 20 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vfmadd231ps ((0 + 21 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vfmadd231ps ((0 + 22 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vfmadd231ps ((0 + 23 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vfmadd231ps ((0 + 24 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vfmadd231ps ((0 + 25 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vfmadd231ps ((0 + 26 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vfmadd231ps ((0 + 27 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vfmadd231ps ((0 + 28 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vfmadd231ps ((0 + 29 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vfmadd231ps ((0 + 30 * CH_DT_BLK) * D_BYTES)(%%rax)%{1to16}, %%zmm31, %%zmm30\n .endif\n"
        "lea D_BYTES(%%rax), %%rax\n"
        "sub $1, %%r10\n"
        "cmp $0, %%r10\n"
        "jne 6b\n" // label_ic_remain

"7:\n" // label_finalize_session
        "test $(KERNEL_FLAG_RELU | KERNEL_FLAG_RELU6), %%r11\n"
        "jz 8f\n" // label_relu_end
        "vpxord %%zmm31, %%zmm31, %%zmm31\n"
        ".if HW_LEN > 0\n vmaxps %%zmm31, %%zmm0, %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vmaxps %%zmm31, %%zmm1, %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vmaxps %%zmm31, %%zmm2, %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vmaxps %%zmm31, %%zmm3, %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vmaxps %%zmm31, %%zmm4, %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vmaxps %%zmm31, %%zmm5, %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vmaxps %%zmm31, %%zmm6, %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vmaxps %%zmm31, %%zmm7, %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vmaxps %%zmm31, %%zmm8, %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vmaxps %%zmm31, %%zmm9, %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vmaxps %%zmm31, %%zmm10, %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vmaxps %%zmm31, %%zmm11, %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vmaxps %%zmm31, %%zmm12, %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vmaxps %%zmm31, %%zmm13, %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vmaxps %%zmm31, %%zmm14, %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vmaxps %%zmm31, %%zmm15, %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vmaxps %%zmm31, %%zmm16, %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vmaxps %%zmm31, %%zmm17, %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vmaxps %%zmm31, %%zmm18, %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vmaxps %%zmm31, %%zmm19, %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vmaxps %%zmm31, %%zmm20, %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vmaxps %%zmm31, %%zmm21, %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vmaxps %%zmm31, %%zmm22, %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vmaxps %%zmm31, %%zmm23, %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vmaxps %%zmm31, %%zmm24, %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vmaxps %%zmm31, %%zmm25, %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vmaxps %%zmm31, %%zmm26, %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vmaxps %%zmm31, %%zmm27, %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vmaxps %%zmm31, %%zmm28, %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vmaxps %%zmm31, %%zmm29, %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vmaxps %%zmm31, %%zmm30, %%zmm30\n .endif\n"
        "test $KERNEL_FLAG_RELU6, %%r11\n"
        "jz 8f\n" // label_relu_end
        "vbroadcastss (%[six]), %%zmm31\n"
        ".if HW_LEN > 0\n vminps %%zmm31, %%zmm0, %%zmm0\n .endif\n"
        ".if HW_LEN > 1\n vminps %%zmm31, %%zmm1, %%zmm1\n .endif\n"
        ".if HW_LEN > 2\n vminps %%zmm31, %%zmm2, %%zmm2\n .endif\n"
        ".if HW_LEN > 3\n vminps %%zmm31, %%zmm3, %%zmm3\n .endif\n"
        ".if HW_LEN > 4\n vminps %%zmm31, %%zmm4, %%zmm4\n .endif\n"
        ".if HW_LEN > 5\n vminps %%zmm31, %%zmm5, %%zmm5\n .endif\n"
        ".if HW_LEN > 6\n vminps %%zmm31, %%zmm6, %%zmm6\n .endif\n"
        ".if HW_LEN > 7\n vminps %%zmm31, %%zmm7, %%zmm7\n .endif\n"
        ".if HW_LEN > 8\n vminps %%zmm31, %%zmm8, %%zmm8\n .endif\n"
        ".if HW_LEN > 9\n vminps %%zmm31, %%zmm9, %%zmm9\n .endif\n"
        ".if HW_LEN > 10\n vminps %%zmm31, %%zmm10, %%zmm10\n .endif\n"
        ".if HW_LEN > 11\n vminps %%zmm31, %%zmm11, %%zmm11\n .endif\n"
        ".if HW_LEN > 12\n vminps %%zmm31, %%zmm12, %%zmm12\n .endif\n"
        ".if HW_LEN > 13\n vminps %%zmm31, %%zmm13, %%zmm13\n .endif\n"
        ".if HW_LEN > 14\n vminps %%zmm31, %%zmm14, %%zmm14\n .endif\n"
        ".if HW_LEN > 15\n vminps %%zmm31, %%zmm15, %%zmm15\n .endif\n"
        ".if HW_LEN > 16\n vminps %%zmm31, %%zmm16, %%zmm16\n .endif\n"
        ".if HW_LEN > 17\n vminps %%zmm31, %%zmm17, %%zmm17\n .endif\n"
        ".if HW_LEN > 18\n vminps %%zmm31, %%zmm18, %%zmm18\n .endif\n"
        ".if HW_LEN > 19\n vminps %%zmm31, %%zmm19, %%zmm19\n .endif\n"
        ".if HW_LEN > 20\n vminps %%zmm31, %%zmm20, %%zmm20\n .endif\n"
        ".if HW_LEN > 21\n vminps %%zmm31, %%zmm21, %%zmm21\n .endif\n"
        ".if HW_LEN > 22\n vminps %%zmm31, %%zmm22, %%zmm22\n .endif\n"
        ".if HW_LEN > 23\n vminps %%zmm31, %%zmm23, %%zmm23\n .endif\n"
        ".if HW_LEN > 24\n vminps %%zmm31, %%zmm24, %%zmm24\n .endif\n"
        ".if HW_LEN > 25\n vminps %%zmm31, %%zmm25, %%zmm25\n .endif\n"
        ".if HW_LEN > 26\n vminps %%zmm31, %%zmm26, %%zmm26\n .endif\n"
        ".if HW_LEN > 27\n vminps %%zmm31, %%zmm27, %%zmm27\n .endif\n"
        ".if HW_LEN > 28\n vminps %%zmm31, %%zmm28, %%zmm28\n .endif\n"
        ".if HW_LEN > 29\n vminps %%zmm31, %%zmm29, %%zmm29\n .endif\n"
        ".if HW_LEN > 30\n vminps %%zmm31, %%zmm30, %%zmm30\n .endif\n"
"8:\n"
        ".if NT_STORE\n"
        ".if HW_LEN > 0\n vmovntps %%zmm0, (0 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 1\n vmovntps %%zmm1, (1 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 2\n vmovntps %%zmm2, (2 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 3\n vmovntps %%zmm3, (3 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 4\n vmovntps %%zmm4, (4 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 5\n vmovntps %%zmm5, (5 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 6\n vmovntps %%zmm6, (6 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 7\n vmovntps %%zmm7, (7 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 8\n vmovntps %%zmm8, (8 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 9\n vmovntps %%zmm9, (9 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 10\n vmovntps %%zmm10, (10 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 11\n vmovntps %%zmm11, (11 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 12\n vmovntps %%zmm12, (12 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 13\n vmovntps %%zmm13, (13 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 14\n vmovntps %%zmm14, (14 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 15\n vmovntps %%zmm15, (15 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 16\n vmovntps %%zmm16, (16 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 17\n vmovntps %%zmm17, (17 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 18\n vmovntps %%zmm18, (18 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 19\n vmovntps %%zmm19, (19 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 20\n vmovntps %%zmm20, (20 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 21\n vmovntps %%zmm21, (21 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 22\n vmovntps %%zmm22, (22 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 23\n vmovntps %%zmm23, (23 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 24\n vmovntps %%zmm24, (24 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 25\n vmovntps %%zmm25, (25 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 26\n vmovntps %%zmm26, (26 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 27\n vmovntps %%zmm27, (27 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 28\n vmovntps %%zmm28, (28 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 29\n vmovntps %%zmm29, (29 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 30\n vmovntps %%zmm30, (30 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".else\n"
        ".if HW_LEN > 0\n vmovups %%zmm0, (0 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 1\n vmovups %%zmm1, (1 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 2\n vmovups %%zmm2, (2 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 3\n vmovups %%zmm3, (3 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 4\n vmovups %%zmm4, (4 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 5\n vmovups %%zmm5, (5 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 6\n vmovups %%zmm6, (6 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 7\n vmovups %%zmm7, (7 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 8\n vmovups %%zmm8, (8 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 9\n vmovups %%zmm9, (9 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 10\n vmovups %%zmm10, (10 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 11\n vmovups %%zmm11, (11 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 12\n vmovups %%zmm12, (12 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 13\n vmovups %%zmm13, (13 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 14\n vmovups %%zmm14, (14 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 15\n vmovups %%zmm15, (15 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 16\n vmovups %%zmm16, (16 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 17\n vmovups %%zmm17, (17 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 18\n vmovups %%zmm18, (18 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 19\n vmovups %%zmm19, (19 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 20\n vmovups %%zmm20, (20 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 21\n vmovups %%zmm21, (21 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 22\n vmovups %%zmm22, (22 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 23\n vmovups %%zmm23, (23 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 24\n vmovups %%zmm24, (24 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 25\n vmovups %%zmm25, (25 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 26\n vmovups %%zmm26, (26 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 27\n vmovups %%zmm27, (27 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 28\n vmovups %%zmm28, (28 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 29\n vmovups %%zmm29, (29 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".if HW_LEN > 30\n vmovups %%zmm30, (30 * CH_DT_BLK * D_BYTES)(%%r14)\n .endif\n"
        ".endif\n"
        "sub $HW_LEN, %%r15\n"
        "cmp $0, %%r15\n"
        "lea (HW_LEN * CH_DT_BLK * D_BYTES)(%%r12), %%r12\n"
        "lea (HW_LEN * CH_DT_BLK * D_BYTES)(%%r13), %%r13\n"
        "lea (HW_LEN * CH_DT_BLK * D_BYTES)(%%r14), %%r14\n"
        "jne 1b\n" // label_init_session
        :
        :
        [priv_param]                  "r" (priv_param),
        [shar_param]                  "r" (shar_param),
        [six]                         "r" (six),
        [NT_STORE]                    "i" (nt_store),
        [HW_LEN]                      "i" (hw_len),
        [KERNEL_FLAG_LD_BIAS]         "i" (KERNEL_FLAG_LD_BIAS()),
        [KERNEL_FLAG_AD_BIAS]         "i" (KERNEL_FLAG_AD_BIAS()),
        [KERNEL_FLAG_RELU]            "i" (KERNEL_FLAG_RELU()),
        [KERNEL_FLAG_RELU6]           "i" (KERNEL_FLAG_RELU6())
        :
        "cc",
        "rax", "rbx", "rcx", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
        "zmm0" , "zmm1" , "zmm2" , "zmm3" , "zmm4" , "zmm5" , "zmm6" , "zmm7" ,
        "zmm8" , "zmm9" , "zmm10", "zmm11", "zmm12", "zmm13", "zmm14", "zmm15",
        "zmm16", "zmm17", "zmm18", "zmm19", "zmm20", "zmm21", "zmm22", "zmm23",
        "zmm24", "zmm25", "zmm26", "zmm27", "zmm28", "zmm29", "zmm30", "zmm31",
        "memory"
    );
}

#endif

template <bool nt_store, int32_t oc_len, int32_t hw_len>
void conv2d_n16cx_gemm_direct_fp32_avx512_blk1x31_kernel(
    const int64_t *priv_param,
    const int64_t *shar_param)
{
#ifdef PPL_USE_X86_INLINE_ASM
    if (oc_len == 1 * CH_DT_BLK()) {
        conv2d_n16cx_gemm_direct_fp32_avx512_blk1x31_kernel_core<nt_store, hw_len>(priv_param, shar_param);
        return;
    }
#endif

#define IC_COMPUTE_STEP(IC) do {\
    zmm31 = _mm512_loadu_ps(ic_flt + (IC) * CH_DT_BLK());\
    if (hw_len > 0) zmm0 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 0 * CH_DT_BLK()]), zmm31, zmm0);\
    if (hw_len > 1) zmm1 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 1 * CH_DT_BLK()]), zmm31, zmm1);\
    if (hw_len > 2) zmm2 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 2 * CH_DT_BLK()]), zmm31, zmm2);\
    if (hw_len > 3) zmm3 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 3 * CH_DT_BLK()]), zmm31, zmm3);\
    if (hw_len > 4) zmm4 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 4 * CH_DT_BLK()]), zmm31, zmm4);\
    if (hw_len > 5) zmm5 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 5 * CH_DT_BLK()]), zmm31, zmm5);\
    if (hw_len > 6) zmm6 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 6 * CH_DT_BLK()]), zmm31, zmm6);\
    if (hw_len > 7) zmm7 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 7 * CH_DT_BLK()]), zmm31, zmm7);\
    if (hw_len > 8) zmm8 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 8 * CH_DT_BLK()]), zmm31, zmm8);\
    if (hw_len > 9) zmm9 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 9 * CH_DT_BLK()]), zmm31, zmm9);\
    if (hw_len > 10) zmm10 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 10 * CH_DT_BLK()]), zmm31, zmm10);\
    if (hw_len > 11) zmm11 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 11 * CH_DT_BLK()]), zmm31, zmm11);\
    if (hw_len > 12) zmm12 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 12 * CH_DT_BLK()]), zmm31, zmm12);\
    if (hw_len > 13) zmm13 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 13 * CH_DT_BLK()]), zmm31, zmm13);\
    if (hw_len > 14) zmm14 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 14 * CH_DT_BLK()]), zmm31, zmm14);\
    if (hw_len > 15) zmm15 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 15 * CH_DT_BLK()]), zmm31, zmm15);\
    if (hw_len > 16) zmm16 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 16 * CH_DT_BLK()]), zmm31, zmm16);\
    if (hw_len > 17) zmm17 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 17 * CH_DT_BLK()]), zmm31, zmm17);\
    if (hw_len > 18) zmm18 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 18 * CH_DT_BLK()]), zmm31, zmm18);\
    if (hw_len > 19) zmm19 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 19 * CH_DT_BLK()]), zmm31, zmm19);\
    if (hw_len > 20) zmm20 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 20 * CH_DT_BLK()]), zmm31, zmm20);\
    if (hw_len > 21) zmm21 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 21 * CH_DT_BLK()]), zmm31, zmm21);\
    if (hw_len > 22) zmm22 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 22 * CH_DT_BLK()]), zmm31, zmm22);\
    if (hw_len > 23) zmm23 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 23 * CH_DT_BLK()]), zmm31, zmm23);\
    if (hw_len > 24) zmm24 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 24 * CH_DT_BLK()]), zmm31, zmm24);\
    if (hw_len > 25) zmm25 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 25 * CH_DT_BLK()]), zmm31, zmm25);\
    if (hw_len > 26) zmm26 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 26 * CH_DT_BLK()]), zmm31, zmm26);\
    if (hw_len > 27) zmm27 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 27 * CH_DT_BLK()]), zmm31, zmm27);\
    if (hw_len > 28) zmm28 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 28 * CH_DT_BLK()]), zmm31, zmm28);\
    if (hw_len > 29) zmm29 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 29 * CH_DT_BLK()]), zmm31, zmm29);\
    if (hw_len > 30) zmm30 = _mm512_fmadd_ps(_mm512_set1_ps(ic_src[(IC) + 30 * CH_DT_BLK()]), zmm31, zmm30);\
} while (0)

    __m512 zmm0, zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm7;
    __m512 zmm8, zmm9, zmm10, zmm11, zmm12, zmm13, zmm14, zmm15;
    __m512 zmm16, zmm17, zmm18, zmm19, zmm20, zmm21, zmm22, zmm23;
    __m512 zmm24, zmm25, zmm26, zmm27, zmm28, zmm29, zmm30, zmm31;

    const int64_t src_icb_stride = shar_param[SRC_ICB_STRIDE_IDX()];
    const int64_t kernel_flags = shar_param[FLAGS_IDX()];

    const float *src = PICK_PARAM(const float*, priv_param, SRC_IDX());
    const float *his = PICK_PARAM(const float*, priv_param, HIS_IDX());
    float *dst       = PICK_PARAM(float*, priv_param, DST_IDX());
    int64_t hw       = priv_param[HW_IDX()];
    do {
        if (kernel_flags & KERNEL_FLAG_LD_BIAS()) {
            const float* bias = PICK_PARAM(const float*, priv_param, BIAS_IDX());
            if (oc_len > 0 * CH_DT_BLK()) {
                if (hw_len > 0) zmm0 = _mm512_loadu_ps(bias + 0 * CH_DT_BLK());
                if (hw_len > 1) zmm1 = zmm0;
                if (hw_len > 2) zmm2 = zmm0;
                if (hw_len > 3) zmm3 = zmm0;
                if (hw_len > 4) zmm4 = zmm0;
                if (hw_len > 5) zmm5 = zmm0;
                if (hw_len > 6) zmm6 = zmm0;
                if (hw_len > 7) zmm7 = zmm0;
                if (hw_len > 8) zmm8 = zmm0;
                if (hw_len > 9) zmm9 = zmm0;
                if (hw_len > 10) zmm10 = zmm0;
                if (hw_len > 11) zmm11 = zmm0;
                if (hw_len > 12) zmm12 = zmm0;
                if (hw_len > 13) zmm13 = zmm0;
                if (hw_len > 14) zmm14 = zmm0;
                if (hw_len > 15) zmm15 = zmm0;
                if (hw_len > 16) zmm16 = zmm0;
                if (hw_len > 17) zmm17 = zmm0;
                if (hw_len > 18) zmm18 = zmm0;
                if (hw_len > 19) zmm19 = zmm0;
                if (hw_len > 20) zmm20 = zmm0;
                if (hw_len > 21) zmm21 = zmm0;
                if (hw_len > 22) zmm22 = zmm0;
                if (hw_len > 23) zmm23 = zmm0;
                if (hw_len > 24) zmm24 = zmm0;
                if (hw_len > 25) zmm25 = zmm0;
                if (hw_len > 26) zmm26 = zmm0;
                if (hw_len > 27) zmm27 = zmm0;
                if (hw_len > 28) zmm28 = zmm0;
                if (hw_len > 29) zmm29 = zmm0;
                if (hw_len > 30) zmm30 = zmm0;
            }
        } else {
            const float *l_his = his;
            if (oc_len > 0 * CH_DT_BLK()) {
                if (hw_len > 0) zmm0 = _mm512_loadu_ps(l_his + 0 * CH_DT_BLK());
                if (hw_len > 1) zmm1 = _mm512_loadu_ps(l_his + 1 * CH_DT_BLK());
                if (hw_len > 2) zmm2 = _mm512_loadu_ps(l_his + 2 * CH_DT_BLK());
                if (hw_len > 3) zmm3 = _mm512_loadu_ps(l_his + 3 * CH_DT_BLK());
                if (hw_len > 4) zmm4 = _mm512_loadu_ps(l_his + 4 * CH_DT_BLK());
                if (hw_len > 5) zmm5 = _mm512_loadu_ps(l_his + 5 * CH_DT_BLK());
                if (hw_len > 6) zmm6 = _mm512_loadu_ps(l_his + 6 * CH_DT_BLK());
                if (hw_len > 7) zmm7 = _mm512_loadu_ps(l_his + 7 * CH_DT_BLK());
                if (hw_len > 8) zmm8 = _mm512_loadu_ps(l_his + 8 * CH_DT_BLK());
                if (hw_len > 9) zmm9 = _mm512_loadu_ps(l_his + 9 * CH_DT_BLK());
                if (hw_len > 10) zmm10 = _mm512_loadu_ps(l_his + 10 * CH_DT_BLK());
                if (hw_len > 11) zmm11 = _mm512_loadu_ps(l_his + 11 * CH_DT_BLK());
                if (hw_len > 12) zmm12 = _mm512_loadu_ps(l_his + 12 * CH_DT_BLK());
                if (hw_len > 13) zmm13 = _mm512_loadu_ps(l_his + 13 * CH_DT_BLK());
                if (hw_len > 14) zmm14 = _mm512_loadu_ps(l_his + 14 * CH_DT_BLK());
                if (hw_len > 15) zmm15 = _mm512_loadu_ps(l_his + 15 * CH_DT_BLK());
                if (hw_len > 16) zmm16 = _mm512_loadu_ps(l_his + 16 * CH_DT_BLK());
                if (hw_len > 17) zmm17 = _mm512_loadu_ps(l_his + 17 * CH_DT_BLK());
                if (hw_len > 18) zmm18 = _mm512_loadu_ps(l_his + 18 * CH_DT_BLK());
                if (hw_len > 19) zmm19 = _mm512_loadu_ps(l_his + 19 * CH_DT_BLK());
                if (hw_len > 20) zmm20 = _mm512_loadu_ps(l_his + 20 * CH_DT_BLK());
                if (hw_len > 21) zmm21 = _mm512_loadu_ps(l_his + 21 * CH_DT_BLK());
                if (hw_len > 22) zmm22 = _mm512_loadu_ps(l_his + 22 * CH_DT_BLK());
                if (hw_len > 23) zmm23 = _mm512_loadu_ps(l_his + 23 * CH_DT_BLK());
                if (hw_len > 24) zmm24 = _mm512_loadu_ps(l_his + 24 * CH_DT_BLK());
                if (hw_len > 25) zmm25 = _mm512_loadu_ps(l_his + 25 * CH_DT_BLK());
                if (hw_len > 26) zmm26 = _mm512_loadu_ps(l_his + 26 * CH_DT_BLK());
                if (hw_len > 27) zmm27 = _mm512_loadu_ps(l_his + 27 * CH_DT_BLK());
                if (hw_len > 28) zmm28 = _mm512_loadu_ps(l_his + 28 * CH_DT_BLK());
                if (hw_len > 29) zmm29 = _mm512_loadu_ps(l_his + 29 * CH_DT_BLK());
                if (hw_len > 30) zmm30 = _mm512_loadu_ps(l_his + 30 * CH_DT_BLK());
            }
        }

        if (kernel_flags & KERNEL_FLAG_AD_BIAS()) {
            const float* bias = PICK_PARAM(const float*, priv_param, BIAS_IDX());
            if (oc_len > 0 * CH_DT_BLK()) {
                zmm31 = _mm512_loadu_ps(bias + 0 * CH_DT_BLK());
                if (hw_len > 0) zmm0 = _mm512_add_ps(zmm31, zmm0);
                if (hw_len > 1) zmm1 = _mm512_add_ps(zmm31, zmm1);
                if (hw_len > 2) zmm2 = _mm512_add_ps(zmm31, zmm2);
                if (hw_len > 3) zmm3 = _mm512_add_ps(zmm31, zmm3);
                if (hw_len > 4) zmm4 = _mm512_add_ps(zmm31, zmm4);
                if (hw_len > 5) zmm5 = _mm512_add_ps(zmm31, zmm5);
                if (hw_len > 6) zmm6 = _mm512_add_ps(zmm31, zmm6);
                if (hw_len > 7) zmm7 = _mm512_add_ps(zmm31, zmm7);
                if (hw_len > 8) zmm8 = _mm512_add_ps(zmm31, zmm8);
                if (hw_len > 9) zmm9 = _mm512_add_ps(zmm31, zmm9);
                if (hw_len > 10) zmm10 = _mm512_add_ps(zmm31, zmm10);
                if (hw_len > 11) zmm11 = _mm512_add_ps(zmm31, zmm11);
                if (hw_len > 12) zmm12 = _mm512_add_ps(zmm31, zmm12);
                if (hw_len > 13) zmm13 = _mm512_add_ps(zmm31, zmm13);
                if (hw_len > 14) zmm14 = _mm512_add_ps(zmm31, zmm14);
                if (hw_len > 15) zmm15 = _mm512_add_ps(zmm31, zmm15);
                if (hw_len > 16) zmm16 = _mm512_add_ps(zmm31, zmm16);
                if (hw_len > 17) zmm17 = _mm512_add_ps(zmm31, zmm17);
                if (hw_len > 18) zmm18 = _mm512_add_ps(zmm31, zmm18);
                if (hw_len > 19) zmm19 = _mm512_add_ps(zmm31, zmm19);
                if (hw_len > 20) zmm20 = _mm512_add_ps(zmm31, zmm20);
                if (hw_len > 21) zmm21 = _mm512_add_ps(zmm31, zmm21);
                if (hw_len > 22) zmm22 = _mm512_add_ps(zmm31, zmm22);
                if (hw_len > 23) zmm23 = _mm512_add_ps(zmm31, zmm23);
                if (hw_len > 24) zmm24 = _mm512_add_ps(zmm31, zmm24);
                if (hw_len > 25) zmm25 = _mm512_add_ps(zmm31, zmm25);
                if (hw_len > 26) zmm26 = _mm512_add_ps(zmm31, zmm26);
                if (hw_len > 27) zmm27 = _mm512_add_ps(zmm31, zmm27);
                if (hw_len > 28) zmm28 = _mm512_add_ps(zmm31, zmm28);
                if (hw_len > 29) zmm29 = _mm512_add_ps(zmm31, zmm29);
                if (hw_len > 30) zmm30 = _mm512_add_ps(zmm31, zmm30);
            }
        }

        const float *icb_src = src;
        const float *icb_flt = PICK_PARAM(const float*, priv_param, FLT_IDX());
        int64_t channels     = shar_param[CHANNELS_IDX()];
        while (channels >= CH_DT_BLK()) {
            channels -= CH_DT_BLK();
            const float *ic_src = icb_src;
            const float *ic_flt = icb_flt;
            for (int64_t ic = 0; ic < CH_DT_BLK(); ++ic) {
                IC_COMPUTE_STEP(0);
                ic_src += 1;
                ic_flt += CH_DT_BLK();
            }
            icb_flt += CH_DT_BLK() * CH_DT_BLK();
            icb_src += src_icb_stride;
        }
        if (channels > 0) {
            const float *ic_src = icb_src;
            const float *ic_flt = icb_flt;
            for (int64_t ic = 0; ic < channels; ++ic) {
                IC_COMPUTE_STEP(0);
                ic_src += 1;
                ic_flt += CH_DT_BLK();
            }
        }

        if (kernel_flags & (KERNEL_FLAG_RELU() | KERNEL_FLAG_RELU6())) {
            zmm31 = _mm512_setzero_ps();
            if (oc_len > 0 * CH_DT_BLK()) {
                if (hw_len > 0) zmm0 = _mm512_max_ps(zmm0, zmm31);
                if (hw_len > 1) zmm1 = _mm512_max_ps(zmm1, zmm31);
                if (hw_len > 2) zmm2 = _mm512_max_ps(zmm2, zmm31);
                if (hw_len > 3) zmm3 = _mm512_max_ps(zmm3, zmm31);
                if (hw_len > 4) zmm4 = _mm512_max_ps(zmm4, zmm31);
                if (hw_len > 5) zmm5 = _mm512_max_ps(zmm5, zmm31);
                if (hw_len > 6) zmm6 = _mm512_max_ps(zmm6, zmm31);
                if (hw_len > 7) zmm7 = _mm512_max_ps(zmm7, zmm31);
                if (hw_len > 8) zmm8 = _mm512_max_ps(zmm8, zmm31);
                if (hw_len > 9) zmm9 = _mm512_max_ps(zmm9, zmm31);
                if (hw_len > 10) zmm10 = _mm512_max_ps(zmm10, zmm31);
                if (hw_len > 11) zmm11 = _mm512_max_ps(zmm11, zmm31);
                if (hw_len > 12) zmm12 = _mm512_max_ps(zmm12, zmm31);
                if (hw_len > 13) zmm13 = _mm512_max_ps(zmm13, zmm31);
                if (hw_len > 14) zmm14 = _mm512_max_ps(zmm14, zmm31);
                if (hw_len > 15) zmm15 = _mm512_max_ps(zmm15, zmm31);
                if (hw_len > 16) zmm16 = _mm512_max_ps(zmm16, zmm31);
                if (hw_len > 17) zmm17 = _mm512_max_ps(zmm17, zmm31);
                if (hw_len > 18) zmm18 = _mm512_max_ps(zmm18, zmm31);
                if (hw_len > 19) zmm19 = _mm512_max_ps(zmm19, zmm31);
                if (hw_len > 20) zmm20 = _mm512_max_ps(zmm20, zmm31);
                if (hw_len > 21) zmm21 = _mm512_max_ps(zmm21, zmm31);
                if (hw_len > 22) zmm22 = _mm512_max_ps(zmm22, zmm31);
                if (hw_len > 23) zmm23 = _mm512_max_ps(zmm23, zmm31);
                if (hw_len > 24) zmm24 = _mm512_max_ps(zmm24, zmm31);
                if (hw_len > 25) zmm25 = _mm512_max_ps(zmm25, zmm31);
                if (hw_len > 26) zmm26 = _mm512_max_ps(zmm26, zmm31);
                if (hw_len > 27) zmm27 = _mm512_max_ps(zmm27, zmm31);
                if (hw_len > 28) zmm28 = _mm512_max_ps(zmm28, zmm31);
                if (hw_len > 29) zmm29 = _mm512_max_ps(zmm29, zmm31);
                if (hw_len > 30) zmm30 = _mm512_max_ps(zmm30, zmm31);
            }
        }
        if (kernel_flags & KERNEL_FLAG_RELU6()) {
            zmm31 = _mm512_set1_ps(6.0f);
            if (oc_len > 0 * CH_DT_BLK()) {
                if (hw_len > 0) zmm0 = _mm512_min_ps(zmm0, zmm31);
                if (hw_len > 1) zmm1 = _mm512_min_ps(zmm1, zmm31);
                if (hw_len > 2) zmm2 = _mm512_min_ps(zmm2, zmm31);
                if (hw_len > 3) zmm3 = _mm512_min_ps(zmm3, zmm31);
                if (hw_len > 4) zmm4 = _mm512_min_ps(zmm4, zmm31);
                if (hw_len > 5) zmm5 = _mm512_min_ps(zmm5, zmm31);
                if (hw_len > 6) zmm6 = _mm512_min_ps(zmm6, zmm31);
                if (hw_len > 7) zmm7 = _mm512_min_ps(zmm7, zmm31);
                if (hw_len > 8) zmm8 = _mm512_min_ps(zmm8, zmm31);
                if (hw_len > 9) zmm9 = _mm512_min_ps(zmm9, zmm31);
                if (hw_len > 10) zmm10 = _mm512_min_ps(zmm10, zmm31);
                if (hw_len > 11) zmm11 = _mm512_min_ps(zmm11, zmm31);
                if (hw_len > 12) zmm12 = _mm512_min_ps(zmm12, zmm31);
                if (hw_len > 13) zmm13 = _mm512_min_ps(zmm13, zmm31);
                if (hw_len > 14) zmm14 = _mm512_min_ps(zmm14, zmm31);
                if (hw_len > 15) zmm15 = _mm512_min_ps(zmm15, zmm31);
                if (hw_len > 16) zmm16 = _mm512_min_ps(zmm16, zmm31);
                if (hw_len > 17) zmm17 = _mm512_min_ps(zmm17, zmm31);
                if (hw_len > 18) zmm18 = _mm512_min_ps(zmm18, zmm31);
                if (hw_len > 19) zmm19 = _mm512_min_ps(zmm19, zmm31);
                if (hw_len > 20) zmm20 = _mm512_min_ps(zmm20, zmm31);
                if (hw_len > 21) zmm21 = _mm512_min_ps(zmm21, zmm31);
                if (hw_len > 22) zmm22 = _mm512_min_ps(zmm22, zmm31);
                if (hw_len > 23) zmm23 = _mm512_min_ps(zmm23, zmm31);
                if (hw_len > 24) zmm24 = _mm512_min_ps(zmm24, zmm31);
                if (hw_len > 25) zmm25 = _mm512_min_ps(zmm25, zmm31);
                if (hw_len > 26) zmm26 = _mm512_min_ps(zmm26, zmm31);
                if (hw_len > 27) zmm27 = _mm512_min_ps(zmm27, zmm31);
                if (hw_len > 28) zmm28 = _mm512_min_ps(zmm28, zmm31);
                if (hw_len > 29) zmm29 = _mm512_min_ps(zmm29, zmm31);
                if (hw_len > 30) zmm30 = _mm512_min_ps(zmm30, zmm31);
            }
        }

        if (nt_store) {
            float* l_dst = dst;
            if (oc_len > 0 * CH_DT_BLK()) {
                if (hw_len > 0) _mm512_stream_ps(l_dst + 0 * CH_DT_BLK(), zmm0);
                if (hw_len > 1) _mm512_stream_ps(l_dst + 1 * CH_DT_BLK(), zmm1);
                if (hw_len > 2) _mm512_stream_ps(l_dst + 2 * CH_DT_BLK(), zmm2);
                if (hw_len > 3) _mm512_stream_ps(l_dst + 3 * CH_DT_BLK(), zmm3);
                if (hw_len > 4) _mm512_stream_ps(l_dst + 4 * CH_DT_BLK(), zmm4);
                if (hw_len > 5) _mm512_stream_ps(l_dst + 5 * CH_DT_BLK(), zmm5);
                if (hw_len > 6) _mm512_stream_ps(l_dst + 6 * CH_DT_BLK(), zmm6);
                if (hw_len > 7) _mm512_stream_ps(l_dst + 7 * CH_DT_BLK(), zmm7);
                if (hw_len > 8) _mm512_stream_ps(l_dst + 8 * CH_DT_BLK(), zmm8);
                if (hw_len > 9) _mm512_stream_ps(l_dst + 9 * CH_DT_BLK(), zmm9);
                if (hw_len > 10) _mm512_stream_ps(l_dst + 10 * CH_DT_BLK(), zmm10);
                if (hw_len > 11) _mm512_stream_ps(l_dst + 11 * CH_DT_BLK(), zmm11);
                if (hw_len > 12) _mm512_stream_ps(l_dst + 12 * CH_DT_BLK(), zmm12);
                if (hw_len > 13) _mm512_stream_ps(l_dst + 13 * CH_DT_BLK(), zmm13);
                if (hw_len > 14) _mm512_stream_ps(l_dst + 14 * CH_DT_BLK(), zmm14);
                if (hw_len > 15) _mm512_stream_ps(l_dst + 15 * CH_DT_BLK(), zmm15);
                if (hw_len > 16) _mm512_stream_ps(l_dst + 16 * CH_DT_BLK(), zmm16);
                if (hw_len > 17) _mm512_stream_ps(l_dst + 17 * CH_DT_BLK(), zmm17);
                if (hw_len > 18) _mm512_stream_ps(l_dst + 18 * CH_DT_BLK(), zmm18);
                if (hw_len > 19) _mm512_stream_ps(l_dst + 19 * CH_DT_BLK(), zmm19);
                if (hw_len > 20) _mm512_stream_ps(l_dst + 20 * CH_DT_BLK(), zmm20);
                if (hw_len > 21) _mm512_stream_ps(l_dst + 21 * CH_DT_BLK(), zmm21);
                if (hw_len > 22) _mm512_stream_ps(l_dst + 22 * CH_DT_BLK(), zmm22);
                if (hw_len > 23) _mm512_stream_ps(l_dst + 23 * CH_DT_BLK(), zmm23);
                if (hw_len > 24) _mm512_stream_ps(l_dst + 24 * CH_DT_BLK(), zmm24);
                if (hw_len > 25) _mm512_stream_ps(l_dst + 25 * CH_DT_BLK(), zmm25);
                if (hw_len > 26) _mm512_stream_ps(l_dst + 26 * CH_DT_BLK(), zmm26);
                if (hw_len > 27) _mm512_stream_ps(l_dst + 27 * CH_DT_BLK(), zmm27);
                if (hw_len > 28) _mm512_stream_ps(l_dst + 28 * CH_DT_BLK(), zmm28);
                if (hw_len > 29) _mm512_stream_ps(l_dst + 29 * CH_DT_BLK(), zmm29);
                if (hw_len > 30) _mm512_stream_ps(l_dst + 30 * CH_DT_BLK(), zmm30);
            }
        } else {
            float* l_dst = dst;
            if (oc_len > 0 * CH_DT_BLK()) {
                if (hw_len > 0) _mm512_storeu_ps(l_dst + 0 * CH_DT_BLK(), zmm0);
                if (hw_len > 1) _mm512_storeu_ps(l_dst + 1 * CH_DT_BLK(), zmm1);
                if (hw_len > 2) _mm512_storeu_ps(l_dst + 2 * CH_DT_BLK(), zmm2);
                if (hw_len > 3) _mm512_storeu_ps(l_dst + 3 * CH_DT_BLK(), zmm3);
                if (hw_len > 4) _mm512_storeu_ps(l_dst + 4 * CH_DT_BLK(), zmm4);
                if (hw_len > 5) _mm512_storeu_ps(l_dst + 5 * CH_DT_BLK(), zmm5);
                if (hw_len > 6) _mm512_storeu_ps(l_dst + 6 * CH_DT_BLK(), zmm6);
                if (hw_len > 7) _mm512_storeu_ps(l_dst + 7 * CH_DT_BLK(), zmm7);
                if (hw_len > 8) _mm512_storeu_ps(l_dst + 8 * CH_DT_BLK(), zmm8);
                if (hw_len > 9) _mm512_storeu_ps(l_dst + 9 * CH_DT_BLK(), zmm9);
                if (hw_len > 10) _mm512_storeu_ps(l_dst + 10 * CH_DT_BLK(), zmm10);
                if (hw_len > 11) _mm512_storeu_ps(l_dst + 11 * CH_DT_BLK(), zmm11);
                if (hw_len > 12) _mm512_storeu_ps(l_dst + 12 * CH_DT_BLK(), zmm12);
                if (hw_len > 13) _mm512_storeu_ps(l_dst + 13 * CH_DT_BLK(), zmm13);
                if (hw_len > 14) _mm512_storeu_ps(l_dst + 14 * CH_DT_BLK(), zmm14);
                if (hw_len > 15) _mm512_storeu_ps(l_dst + 15 * CH_DT_BLK(), zmm15);
                if (hw_len > 16) _mm512_storeu_ps(l_dst + 16 * CH_DT_BLK(), zmm16);
                if (hw_len > 17) _mm512_storeu_ps(l_dst + 17 * CH_DT_BLK(), zmm17);
                if (hw_len > 18) _mm512_storeu_ps(l_dst + 18 * CH_DT_BLK(), zmm18);
                if (hw_len > 19) _mm512_storeu_ps(l_dst + 19 * CH_DT_BLK(), zmm19);
                if (hw_len > 20) _mm512_storeu_ps(l_dst + 20 * CH_DT_BLK(), zmm20);
                if (hw_len > 21) _mm512_storeu_ps(l_dst + 21 * CH_DT_BLK(), zmm21);
                if (hw_len > 22) _mm512_storeu_ps(l_dst + 22 * CH_DT_BLK(), zmm22);
                if (hw_len > 23) _mm512_storeu_ps(l_dst + 23 * CH_DT_BLK(), zmm23);
                if (hw_len > 24) _mm512_storeu_ps(l_dst + 24 * CH_DT_BLK(), zmm24);
                if (hw_len > 25) _mm512_storeu_ps(l_dst + 25 * CH_DT_BLK(), zmm25);
                if (hw_len > 26) _mm512_storeu_ps(l_dst + 26 * CH_DT_BLK(), zmm26);
                if (hw_len > 27) _mm512_storeu_ps(l_dst + 27 * CH_DT_BLK(), zmm27);
                if (hw_len > 28) _mm512_storeu_ps(l_dst + 28 * CH_DT_BLK(), zmm28);
                if (hw_len > 29) _mm512_storeu_ps(l_dst + 29 * CH_DT_BLK(), zmm29);
                if (hw_len > 30) _mm512_storeu_ps(l_dst + 30 * CH_DT_BLK(), zmm30);
            }
        }
        src += hw_len * CH_DT_BLK();
        his += hw_len * CH_DT_BLK();
        dst += hw_len * CH_DT_BLK();
        hw -= hw_len;
    } while (hw > 0);
#undef IC_COMPUTE_STEP
}

}}};

#endif


Remember “multitwitch”? (reference: http://multitwitch.tv/)
First off, I am a responsible and disciplined Twitch Partner, to by best ability I will in no way ever knowingly break the ToS. That said, I am at a cross-roads with an app I want to develop.
I am testing an app that auto-syndicates a multitwitch-like webpage. In other words, a webpage that embeds more than one twitch stream based on a list of names. The list of names is made when a streamers adds their name to the list and opens the webpage which contains multiple embedded streams.
We already tested this, and it works really well. The handful of participating streamers are getting 5-10x more views, and the streamers and viewers alike love it.
I just want to make sure this is not “misuse” of any Twitch services, and confirm this is not automated viewing (viewbotting) in any way. Multi-Twitch (http://multitwitch.tv/) seems to be OK, and i want to make sure that syndicating the list of multi-twitchers is not somehow changing things.
The question might be stated like: When you open a browser with multiple embedded streamers on it (based on a syndicated list of streamers), are you or anyone else misusing Twitch servers?
I just want to make sure I am not missing something here. Thank you guys!
Note: I am not as much interested in discussing other details of this app, eg community perception or how uninformed viewers may feel about “embedding”. I am only interested in the rules and ToS for now. IF we pass that, then im happy to discuss more logistics and community perception. You may be interested to know that the community (including viewers and streamers) so far LOVES this idea and cant wait to see this launch.
Thanks and cheers!


You have $$$c_1$$$ letters 'a', $$$c_2$$$ letters 'b', ..., $$$c_{26}$$$ letters 'z'. You want to build a beautiful string of length $$$n$$$ from them (obviously, you cannot use the $$$i$$$-th letter more than $$$c_i$$$ times). Each $$$c_i$$$ is greater than $$$\frac{n}{3}$$$.

A string is called beautiful if there are no palindromic contiguous substrings of odd length greater than $$$1$$$ in it. For example, the string "abacaba" is not beautiful, it has several palindromic substrings of odd length greater than $$$1$$$ (for example, "aca"). Another example: the string "abcaa" is beautiful.

Calculate the number of different strings you can build, and print the answer modulo $$$998244353$$$.


A superhero fights with a monster. The battle consists of rounds, each of which lasts exactly $$$n$$$ minutes. After a round ends, the next round starts immediately. This is repeated over and over again.

Each round has the same scenario. It is described by a sequence of $$$n$$$ numbers: $$$d_1, d_2, \dots, d_n$$$ ($$$-10^6 \le d_i \le 10^6$$$). The $$$i$$$-th element means that monster's hp (hit points) changes by the value $$$d_i$$$ during the $$$i$$$-th minute of each round. Formally, if before the $$$i$$$-th minute of a round the monster's hp is $$$h$$$, then after the $$$i$$$-th minute it changes to $$$h := h + d_i$$$.

The monster's initial hp is $$$H$$$. It means that before the battle the monster has $$$H$$$ hit points. Print the first minute after which the monster dies. The monster dies if its hp is less than or equal to $$$0$$$. Print -1 if the battle continues infinitely.


Vasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom of A Little Closer. However, Vasilisa the Wise does not know what the box's secret is, since she cannot open it again. She hopes that you will help her one more time with that.

The box's lock looks as follows: it contains 4 identical deepenings for gems as a 2 × 2 square, and some integer numbers are written at the lock's edge near the deepenings. The example of a lock is given on the picture below.

The box is accompanied with 9 gems. Their shapes match the deepenings' shapes and each gem contains one number from 1 to 9 (each number is written on exactly one gem). The box will only open after it is decorated with gems correctly: that is, each deepening in the lock should be filled with exactly one gem. Also, the sums of numbers in the square's rows, columns and two diagonals of the square should match the numbers written at the lock's edge. For example, the above lock will open if we fill the deepenings with gems with numbers as is shown on the picture below.

Now Vasilisa the Wise wants to define, given the numbers on the box's lock, which gems she should put in the deepenings to open the box. Help Vasilisa to solve this challenging task.


#ifndef WIN32_H
#define WIN32_H

#include <QtGlobal>

#ifdef Q_OS_WIN

#include <QFileInfo>
#include <QString>

namespace Farman
{

namespace Win32
{

extern bool isSystemFile(const QFileInfo& fileInfo);
extern qint64 getFileSizeOnDisk(const QString& filePath);
extern QString getCompilerVersion();

}           // namespace Win32

}           // namespace Farman

using namespace Farman::Win32;

#endif

#endif // WIN32_H


Graduate NYC! CUNY/DOE College Readiness and Success Initiative
The Office of Undergraduate Studies participates in the CUNY/ NYC Department of Education College Readiness and Success Initiative.
In August 2010, as part of their Postsecondary strategy, the Bill and Melinda Gates Foundation awarded New York City $3 million over three years for the Graduate NYC! College Readiness & Success initiative. This initiative brings together the resources of the Mayor’s Office, the NYC Department of Education, the City University of New York, several city agencies, and an extensive group of local community-based organizations, with the goal of “doubling the number” of CUNY graduates by 2020. The Mayor and the Chancellors have committed to significantly improving the educational outcomes of all New York City students. To accomplish this ambitious goal Graduate NYC! has developed seven project based teams that will focus on student skills proficiency, advisement and planning along the postsecondary continuum, and operational improvements. This effort is the result of a shared belief that improving high school and college outcomes for all students is imperative to the city’s long term health and economic stability.
Graduate NYC! resources:
- Graduate NYC! Project Update (Graduate NYC, 2012) <pdf>
- Graduate NYC! Curriculum Alignment Project Overview (Graduate NYC, 2012) <pdf>
- Graduate NYC! Early Intervention Project Overview (Graduate NYC, 2012) <pdf>
- Graduate NYC! Overview (Graduate NYC, 2010) <pdf>
- Graduate NYC! Project Descriptions (Graduate NYC, 2010) <pdf>


Please could you let me know how to apply paragraph styles and set the overall workbook theme via Aspose.
You mean MS Excel 2007 Themes feature in Page Layout menu packet, well, you should use your own code to apply style formatting (provided in themes) for cell shading colors, fonts and other attributes etc. using Aspose.Cells APIs.
We will look into the feature in our future versions though.
Thank you for considering Aspose.
Please try the attached version. We have supported to set style formatting with theme color. The following code shows how to set style formatting with theme color:
private static void UseThemeColor()
string outfn = _path + "UseThemeColor_out.xlsx";
Workbook workbook = new Workbook();
Cells cells = workbook.Worksheets.Cells;
Cell c = cells["D3"];
Style s = c.GetStyle();
s.ForegroundThemeColor = new ThemeColor(ThemeColorType.Accent2, 0.5);
s.Pattern = BackgroundType.Solid;
Font f = s.Font;
f.ThemeColor = new ThemeColor(ThemeColorType.Accent4, 0.1);
Thank You & Best Regards,


You are given circular array a0, a1, ..., an - 1. There are two types of operations with it:

- inc(lf, rg, v) — this operation increases each element on the segment [lf, rg] (inclusively) by v;
- rmq(lf, rg) — this operation returns minimal value on the segment [lf, rg] (inclusively).

Assume segments to be circular, so if n = 5 and lf = 3, rg = 1, it means the index sequence: 3, 4, 0, 1.

Write program to process given sequence of operations.


Norm is an intrinsic generally used in all the DSP processors. It calculates the number of bits which are of same as of sign bits.
For example, if the processor has 32 bit number say, int x.
x =19; // 19 in binary will be 0x00000013
and now I do norm(x) on TI DSP it gives the the shift count as 26. This 26 tells me how much this number can be left shifted.
Is there any such instruction available in AMD opteron machine?


You are given a weighted directed graph with $$$n$$$ vertices and $$$m$$$ edges. Each vertex in the graph can be either highlighted or normal. Initially, all vertices are normal. The cost of the graph is defined as the minimum sum of edge weights that need to be selected so that from each normal vertex one can reach at least one highlighted vertex using the selected edges only. If it is not possible to select the edges, the cost is $$$-1$$$ instead.

Your task is to compute the cost of the graph after each of the $$$q$$$ queries. The queries can be of two types:

- $$$+\;v_i$$$ makes vertex $$$v_i$$$ highlighted; it is guaranteed that the vertex is normal before the query.
- $$$-\;v_i$$$ makes vertex $$$v_i$$$ normal; it is guaranteed that the vertex is highlighted before the query.

Output the cost of the graph after each of the $$$q$$$ queries.


If our login (email) and password are stolen, can we lose anything?
We will not supply a new order using a customer's account balance if Bill To and Ship To are changed. We only hold a credit balance when we have been unable to supply an order in full, and such balances are usually very small. We will not refund a balance upon an email request. So it is extremely unlikely anyone can benefit from stealing your login and password.
However, if you know your login and password have been stolen, please inform us. We will block your account and you can open a new account.


You are given an array of integers $$$a_1, a_2, \ldots, a_n$$$ and a number $$$k$$$ ($$$2 \leq k \leq 5$$$). In one operation, you can do the following:

- Choose an index $$$1 \leq i \leq n$$$,
- Set $$$a_i = a_i + 1$$$.

Find the minimum number of operations needed to make the product of all the numbers in the array $$$a_1 \cdot a_2 \cdot \ldots \cdot a_n$$$ divisible by $$$k$$$.


You are given an array of length n and a number k. Let's pick k non-overlapping non-empty subarrays of the initial array. Let si be the sum of the i-th subarray in order from left to right. Compute the maximum value of the following expression:

|s1 - s2| + |s2 - s3| + ... + |sk - 1 - sk|

Here subarray is a contiguous part of an array.


I’m a committed and driven consultant who enjoy working in customer-oriented projects. I have good experience in designing and developing customer-specific IT solutions in .NET. I’m passionate about “Continuous learning” and read blogs and test new technologies regularly. I’m aiming at always leaving my projects with well structured code, which together with well-balanced design solutions makes them easy to maintain.
I believe in Open source and are an active member at Github, you can take a look at my projects and contributions at My Github profile.
I’m the founder of MDA Digital LLC which aims to deliver senior system architects to customers in Sweden and rest of the world.


/*
 * (C) Copyright 2000-2005
 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

/*
 * board/config.h - configuration options, board specific
 */

#ifndef __CONFIG_H
#define __CONFIG_H

/*
 * High Level Configuration Options
 * (easy to change)
 */

#define CONFIG_405EP		1	/* This is a PPC405 CPU		*/
#define CONFIG_BUBINGA	        1	/* ...on a BUBINGA board	*/

#define	CONFIG_SYS_TEXT_BASE	0xFFFC0000

/*
 * Include common defines/options for all AMCC eval boards
 */
#define CONFIG_HOSTNAME		bubinga
#include "amcc-common.h"

#define CONFIG_BOARD_EARLY_INIT_F 1	/* Call board_early_init_f	*/

#define CONFIG_SYS_CLK_FREQ     33333333 /* external frequency to pll   */

#define CONFIG_NO_SERIAL_EEPROM
/*#undef CONFIG_NO_SERIAL_EEPROM*/
/*----------------------------------------------------------------------------*/
#ifdef CONFIG_NO_SERIAL_EEPROM

/*
!-------------------------------------------------------------------------------
! Defines for entry options.
! Note: Because the 405EP SDRAM controller does not support ECC, ECC DIMMs that
!       are plugged in the board will be utilized as non-ECC DIMMs.
!-------------------------------------------------------------------------------
*/
#define        AUTO_MEMORY_CONFIG
#define        DIMM_READ_ADDR 0xAB
#define        DIMM_WRITE_ADDR 0xAA

/*
!-------------------------------------------------------------------------------
! PLL settings for 266MHz CPU, 133MHz PLB/SDRAM, 66MHz EBC, 33MHz PCI,
! assuming a 33MHz input clock to the 405EP from the C9531.
!-------------------------------------------------------------------------------
*/
#define PLLMR0_DEFAULT   PLLMR0_266_133_66
#define PLLMR1_DEFAULT   PLLMR1_266_133_66

#endif
/*----------------------------------------------------------------------------*/

/*
 * Define here the location of the environment variables (FLASH or NVRAM).
 * Note: DENX encourages to use redundant environment in FLASH. NVRAM is only
 *       supported for backward compatibility.
 */
#if 1
#define CONFIG_ENV_IS_IN_FLASH     1	/* use FLASH for environment vars	*/
#else
#define CONFIG_ENV_IS_IN_NVRAM	1	/* use NVRAM for environment vars	*/
#endif

/*
 * Default environment variables
 */
#define	CONFIG_EXTRA_ENV_SETTINGS					\
	CONFIG_AMCC_DEF_ENV						\
	CONFIG_AMCC_DEF_ENV_PPC						\
	CONFIG_AMCC_DEF_ENV_NOR_UPD					\
	"kernel_addr=fff80000\0"					\
	"ramdisk_addr=fff90000\0"					\
	""

#define	CONFIG_PHY_ADDR		1	/* PHY address			*/
#define CONFIG_HAS_ETH0
#define CONFIG_HAS_ETH1
#define CONFIG_PHY1_ADDR	2	/* EMAC1 PHY address		*/

#define CONFIG_RTC_DS174x	1	/* use DS1743 RTC in Bubinga	*/

/*
 * Commands additional to the ones defined in amcc-common.h
 */
#define CONFIG_CMD_DATE
#define CONFIG_CMD_PCI
#define CONFIG_CMD_SDRAM
#define CONFIG_CMD_SNTP

#define CONFIG_SPD_EEPROM      1       /* use SPD EEPROM for setup    */

/*
 * If CONFIG_SYS_EXT_SERIAL_CLOCK, then the UART divisor is 1.
 * If CONFIG_SYS_405_UART_ERRATA_59, then UART divisor is 31.
 * Otherwise, UART divisor is determined by CPU Clock and CONFIG_SYS_BASE_BAUD value.
 * The Linux BASE_BAUD define should match this configuration.
 *    baseBaud = cpuClock/(uartDivisor*16)
 * If CONFIG_SYS_405_UART_ERRATA_59 and 200MHz CPU clock,
 * set Linux BASE_BAUD to 403200.
 */
#define CONFIG_CONS_INDEX	1	/* Use UART0			*/
#undef  CONFIG_SYS_EXT_SERIAL_CLOCK           /* external serial clock */
#undef  CONFIG_SYS_405_UART_ERRATA_59         /* 405GP/CR Rev. D silicon */
#define CONFIG_SYS_BASE_BAUD       691200

/*-----------------------------------------------------------------------
 * I2C stuff
 *-----------------------------------------------------------------------
 */
#define CONFIG_SYS_I2C_PPC4XX_SPEED_0		400000

#define CONFIG_SYS_I2C_NOPROBES	{ {0, 0x69} }	/* avoid i2c probe hangup (?) */
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	6	/* 24C02 requires 5ms delay */

#if defined(CONFIG_CMD_EEPROM)
#define CONFIG_SYS_I2C_EEPROM_ADDR	0x50	/* I2C boot EEPROM (24C02W)	*/
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1	/* Bytes of address		*/
#endif

/*-----------------------------------------------------------------------
 * PCI stuff
 *-----------------------------------------------------------------------
 */
#define PCI_HOST_ADAPTER 0              /* configure ar pci adapter     */
#define PCI_HOST_FORCE  1               /* configure as pci host        */
#define PCI_HOST_AUTO   2               /* detected via arbiter enable  */

#define CONFIG_PCI			/* include pci support	        */
#define CONFIG_PCI_INDIRECT_BRIDGE	/* indirect PCI bridge support */
#define CONFIG_PCI_HOST	PCI_HOST_FORCE  /* select pci host function     */
#define CONFIG_PCI_PNP			/* do pci plug-and-play         */
					/* resource configuration       */
#define CONFIG_PCI_SCAN_SHOW            /* show pci devices on startup  */

#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8	/* AMCC */
#define CONFIG_SYS_PCI_SUBSYS_DEVICEID 0xcafe	/* Whatever */
#define CONFIG_SYS_PCI_CLASSCODE       0x0600  /* PCI Class Code: bridge/host  */
#define CONFIG_SYS_PCI_PTM1LA  0x00000000      /* point to sdram               */
#define CONFIG_SYS_PCI_PTM1MS  0x80000001      /* 2GB, enable hard-wired to 1  */
#define CONFIG_SYS_PCI_PTM1PCI 0x00000000      /* Host: use this pci address   */
#define CONFIG_SYS_PCI_PTM2LA  0x00000000      /* disabled                     */
#define CONFIG_SYS_PCI_PTM2MS  0x00000000      /* disabled                     */
#define CONFIG_SYS_PCI_PTM2PCI 0x04000000      /* Host: use this pci address   */

/*-----------------------------------------------------------------------
 * External peripheral base address
 *-----------------------------------------------------------------------
 */
#define	CONFIG_SYS_KEY_REG_BASE_ADDR	0xF0100000
#define	CONFIG_SYS_IR_REG_BASE_ADDR	0xF0200000
#define	CONFIG_SYS_FPGA_REG_BASE_ADDR	0xF0300000

/*-----------------------------------------------------------------------
 * Start addresses for the final memory configuration
 * (Set up by the startup code)
 */
#define CONFIG_SYS_SRAM_BASE		0xFFF00000
#define CONFIG_SYS_SRAM_SIZE		(256 << 10)
#define CONFIG_SYS_FLASH_BASE		0xFFF80000

/*-----------------------------------------------------------------------
 * FLASH organization
 */
#define CONFIG_SYS_MAX_FLASH_BANKS	1	/* max number of memory banks		*/
#define CONFIG_SYS_MAX_FLASH_SECT	256	/* max number of sectors on one chip	*/

#define CONFIG_SYS_FLASH_ERASE_TOUT	120000	/* Timeout for Flash Erase (in ms)	*/
#define CONFIG_SYS_FLASH_WRITE_TOUT	500	/* Timeout for Flash Write (in ms)	*/

#define CONFIG_SYS_FLASH_ADDR0         0x5555
#define CONFIG_SYS_FLASH_ADDR1         0x2aaa
#define CONFIG_SYS_FLASH_WORD_SIZE     unsigned char

#ifdef CONFIG_ENV_IS_IN_FLASH
#define CONFIG_ENV_SECT_SIZE	0x10000	/* size of one complete sector	*/
#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE-CONFIG_ENV_SECT_SIZE)
#define	CONFIG_ENV_SIZE		0x4000	/* Total Size of Environment Sector	*/

/* Address and size of Redundant Environment Sector	*/
#define CONFIG_ENV_ADDR_REDUND	(CONFIG_ENV_ADDR-CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SIZE)
#endif /* CONFIG_ENV_IS_IN_FLASH */

/*-----------------------------------------------------------------------
 * NVRAM organization
 */
#define CONFIG_SYS_NVRAM_BASE_ADDR	0xf0000000	/* NVRAM base address	*/
#define CONFIG_SYS_NVRAM_SIZE		0x1ff8		/* NVRAM size	*/

#ifdef CONFIG_ENV_IS_IN_NVRAM
#define CONFIG_ENV_SIZE		0x0ff8		/* Size of Environment vars	*/
#define CONFIG_ENV_ADDR		\
	(CONFIG_SYS_NVRAM_BASE_ADDR+CONFIG_SYS_NVRAM_SIZE-CONFIG_ENV_SIZE)	/* Env	*/
#endif

/*
 * Init Memory Controller:
 *
 * BR0/1 and OR0/1 (FLASH)
 */

#define FLASH_BASE0_PRELIM	CONFIG_SYS_FLASH_BASE	/* FLASH bank #0	*/
#define FLASH_BASE1_PRELIM	0		/* FLASH bank #1	*/

/*-----------------------------------------------------------------------
 * Definitions for initial stack pointer and data area (in data cache)
 */
/* use on chip memory ( OCM ) for temperary stack until sdram is tested */
#define CONFIG_SYS_TEMP_STACK_OCM        1

/* On Chip Memory location */
#define CONFIG_SYS_OCM_DATA_ADDR	0xF8000000
#define CONFIG_SYS_OCM_DATA_SIZE	0x1000
#define CONFIG_SYS_INIT_RAM_ADDR	CONFIG_SYS_OCM_DATA_ADDR /* inside of SDRAM		*/
#define CONFIG_SYS_INIT_RAM_SIZE	CONFIG_SYS_OCM_DATA_SIZE /* Size of used area in RAM	*/

#define CONFIG_SYS_GBL_DATA_OFFSET    (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET

/*-----------------------------------------------------------------------
 * External Bus Controller (EBC) Setup
 */

/* Memory Bank 0 (Flash/SRAM) initialization                                    */
#define CONFIG_SYS_EBC_PB0AP           0x04006000
#define CONFIG_SYS_EBC_PB0CR           0xFFF18000  /* BAS=0xFFF,BS=1MB,BU=R/W,BW=8bit  */

/* Memory Bank 1 (NVRAM/RTC) initialization                                     */
#define CONFIG_SYS_EBC_PB1AP           0x04041000
#define CONFIG_SYS_EBC_PB1CR           0xF0018000  /* BAS=0xF00,BS=1MB,BU=R/W,BW=8bit  */

/* Memory Bank 2 (not used) initialization                                      */
#define CONFIG_SYS_EBC_PB2AP           0x00000000
#define CONFIG_SYS_EBC_PB2CR           0x00000000

/* Memory Bank 2 (not used) initialization                                      */
#define CONFIG_SYS_EBC_PB3AP           0x00000000
#define CONFIG_SYS_EBC_PB3CR           0x00000000

/* Memory Bank 4 (FPGA regs) initialization                                     */
#define CONFIG_SYS_EBC_PB4AP           0x01815000
#define CONFIG_SYS_EBC_PB4CR           0xF0318000  /* BAS=0xF03,BS=1MB,BU=R/W,BW=8bit  */

/*-----------------------------------------------------------------------
 * Definitions for Serial Presence Detect EEPROM address
 * (to get SDRAM settings)
 */
#define SPD_EEPROM_ADDRESS      0x55

/*-----------------------------------------------------------------------
 * Definitions for GPIO setup (PPC405EP specific)
 *
 * GPIO0[0]     - External Bus Controller BLAST output
 * GPIO0[1-9]   - Instruction trace outputs
 * GPIO0[10-13] - External Bus Controller CS_1 - CS_4 outputs
 * GPIO0[14-16] - External Bus Controller ABUS3-ABUS5 outputs
 * GPIO0[17-23] - External Interrupts IRQ0 - IRQ6 inputs
 * GPIO0[24-27] - UART0 control signal inputs/outputs
 * GPIO0[28-29] - UART1 data signal input/output
 * GPIO0[30-31] - EMAC0 and EMAC1 reject packet inputs
 */
#define CONFIG_SYS_GPIO0_OSRL          0x55555555
#define CONFIG_SYS_GPIO0_OSRH          0x40000110
#define CONFIG_SYS_GPIO0_ISR1L         0x00000000
#define CONFIG_SYS_GPIO0_ISR1H         0x15555445
#define CONFIG_SYS_GPIO0_TSRL          0x00000000
#define CONFIG_SYS_GPIO0_TSRH          0x00000000
#define CONFIG_SYS_GPIO0_TCR           0xFFFF8014

/*-----------------------------------------------------------------------
 * Some BUBINGA stuff...
 */
#define NVRAM_BASE      0xF0000000
#define FPGA_REG0       0xF0300000    /* FPGA Reg 0              */
#define FPGA_REG1       0xF0300001    /* FPGA Reg 1              */
#define NVRVFY1     0x4f532d4f    /* used to determine if state data in */
#define NVRVFY2     0x50454e00    /* NVRAM initialized (ascii for OS-OPEN)*/

#define FPGA_REG0_F_RANGE     0x80       /* SDRAM PLL freq range              */
#define FPGA_REG0_EXT_INT_DIS 0x20       /* External interface disable        */
#define FPGA_REG0_LED_MASK    0x07       /* Board LEDs DS9, DS10, and DS11    */
#define FPGA_REG0_LED0        0x04       /* Turn on LED0                      */
#define FPGA_REG0_LED1        0x02       /* Turn on LED1                      */
#define FPGA_REG0_LED2        0x01       /* Turn on LED2                      */

#define FPGA_REG1_SSPEC_DIS   0x80       /* C9531 Spread Spectrum disabled    */
#define FPGA_REG1_OFFBD_PCICLK 0x40      /* Onboard PCI clock selected       */
#define FPGA_REG1_CLOCK_MASK  0x30       /* Mask for C9531 output freq select */
#define FPGA_REG1_CLOCK_BIT_SHIFT  4
#define FPGA_REG1_PCI_INT_ARB 0x08       /* PCI Internal arbiter selected     */
#define FPGA_REG1_PCI_FREQ    0x04       /* PCI Frequency select              */
#define FPGA_REG1_OFFB_FLASH  0x02       /* Off board flash                   */
#define FPGA_REG1_SRAM_BOOT   0x01       /* SRAM at 0xFFF80000 not Flash      */

#endif	/* __CONFIG_H */


In some game by Playrix it takes t minutes for an oven to bake k carrot cakes, all cakes are ready at the same moment t minutes after they started baking. Arkady needs at least n cakes to complete a task, but he currently don't have any. However, he has infinitely many ingredients and one oven. Moreover, Arkady can build one more similar oven to make the process faster, it would take d minutes to build the oven. While the new oven is being built, only old one can bake cakes, after the new oven is built, both ovens bake simultaneously. Arkady can't build more than one oven.

Determine if it is reasonable to build the second oven, i.e. will it decrease the minimum time needed to get n cakes or not. If the time needed with the second oven is the same as with one oven, then it is unreasonable.