// File: /workspace/github_cpp_makefile_star2_O2/vsklad[P]cgen/./acl/sha1.hpp
// Function: acl::SHA1<bal::Literal<bal::Cnf>>::execute(bal::Ref<bal::GF2NElement<32ul, bal::Literal<bal::Cnf>>>*, unsigned long, bal::Ref<bal::GF2NElement<32ul, bal::Literal<bal::Cnf>>> (&) [5], bal::Tracer<32ul, bal::Literal<bal::Cnf>>&, unsigned int)
void execute(Ref<Word> *M,
                     const std::size_t M_size, // size in words
                     Ref<Word> (&H)[SHA1_HASH_SIZE],
                     Tracer<SHA1_WORD_SIZE, BIT>& tracer,
                     const uint32_t rounds = SHA1_ROUNDS_NUMBER) {
            
            assert(M_size > 0 && (M_size % SHA1_MESSAGE_BLOCK_SIZE) == 0);
            assert(rounds > 0 && rounds <= SHA1_ROUNDS_NUMBER);
            
            const Ref<Word> K[] = { 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 };
            
            H[0] = 0x67452301;
            H[1] = 0xEFCDAB89;
            H[2] = 0x98BADCFE;
            H[3] = 0x10325476;
            H[4] = 0xC3D2E1F0;
            
            for (std::size_t block_index = 0; block_index < M_size / SHA1_MESSAGE_BLOCK_SIZE; block_index++) {
                Ref<Word> W[rounds];
                
                for (unsigned int t = 0; t < _min(SHA1_MESSAGE_BLOCK_SIZE, rounds); t++) {
                    W[t] = M[t];
                    tracer.trace("M", block_index * SHA1_MESSAGE_BLOCK_SIZE + t, M[t]);
                    tracer.trace("W", block_index * SHA1_MESSAGE_BLOCK_SIZE + t, M[t]);
                };
                
                for (unsigned int t = SHA1_MESSAGE_BLOCK_SIZE; t < rounds; t++) {
                    Ref<Word> eor_args[] = { W[t-3], W[t-8], W[t-14], W[t-16] };
                    W[t] = rotl(eor(eor_args), 1);
                    tracer.trace("W", t, W[t]);
                };
                
                Ref<Word> a = H[0];
                Ref<Word> b = H[1];
                Ref<Word> c = H[2];
                Ref<Word> d = H[3];
                Ref<Word> e = H[4];
                
                for (unsigned int t = 0; t < rounds; t++) {
                    Ref<Word> ft = f(t, b, c, d);
                    tracer.trace("F", block_index * SHA1_MESSAGE_BLOCK_SIZE + t, ft);
                    
                    Ref<Word> temp_args[] = { rotl(a, 5), ft, e, W[t], K[t / 20] };
                    Ref<Word> temp = add(temp_args);
                    
                    e = d;
                    d = c;
                    c = rotl(b, 30);
                    b = a;
                    a = temp;
                    
                    tracer.trace("A", block_index * SHA1_MESSAGE_BLOCK_SIZE + t, a);
                };
                
                H[0] = H[0] + a;
                H[1] = H[1] + b;
                H[2] = H[2] + c;
                H[3] = H[3] + d;
                H[4] = H[4] + e;
                
                M += SHA1_MESSAGE_BLOCK_SIZE;
            };
            
            trace(tracer, "H", H);
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r8, -0x50(%rbp)
movq %rsi, -0xd8(%rbp)
movq %rdi, -0x108(%rbp)
testq %rdx, %rdx
je 0x2993d
movq %rdx, %r15
movl %r15d, %eax
andl $0xf, %eax
jne 0x2993d
movl %r9d, %ebx
leal -0x1(%rbx), %eax
cmpl $0x50, %eax
jae 0x29956
movq %rcx, %r14
leaq -0x80(%rbp), %rsi
movl $0x5a827999, (%rsi)     # imm = 0x5A827999
leaq -0x140(%rbp), %r12
movq %r12, %rdi
callq 0x1bd82
leaq -0x138(%rbp), %r13
leaq -0x30(%rbp), %rsi
movl $0x6ed9eba1, (%rsi)     # imm = 0x6ED9EBA1
movq %r13, %rdi
callq 0x1bd82
leaq -0x130(%rbp), %r13
leaq -0x40(%rbp), %rsi
movl $0x8f1bbcdc, (%rsi)     # imm = 0x8F1BBCDC
movq %r13, %rdi
callq 0x29e88
leaq -0x128(%rbp), %r13
leaq -0x48(%rbp), %rsi
movl $0xca62c1d6, (%rsi)     # imm = 0xCA62C1D6
movq %r13, %rdi
callq 0x29e88
leaq -0x80(%rbp), %rsi
movl $0x67452301, (%rsi)     # imm = 0x67452301
movq %r14, %rdi
callq 0x2077e
leaq -0x80(%rbp), %rsi
movl $0xefcdab89, (%rsi)     # imm = 0xEFCDAB89
leaq 0x8(%r14), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x29e96
leaq -0x80(%rbp), %rsi
movl $0x98badcfe, (%rsi)     # imm = 0x98BADCFE
leaq 0x10(%r14), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x29e96
leaq -0x80(%rbp), %rsi
movl $0x10325476, (%rsi)     # imm = 0x10325476
leaq 0x18(%r14), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x2077e
leaq -0x80(%rbp), %rsi
movl $0xc3d2e1f0, (%rsi)     # imm = 0xC3D2E1F0
movq %r14, -0x90(%rbp)
leaq 0x20(%r14), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x29e96
shrq $0x4, %r15
movl %ebx, %r14d
cmpl $0x10, %ebx
pushq $0x10
popq %rax
cmovbl %ebx, %eax
leaq (,%r14,8), %rcx
movq %rcx, -0xd0(%rbp)
shll $0x3, %eax
movq %rax, -0x118(%rbp)
movq $0x0, -0xc8(%rbp)
leaq 0xf(,%r14,8), %rax
andq $-0x10, %rax
movq %rax, -0xf0(%rbp)
leaq -0x40(%rbp), %r13
xorl %ebx, %ebx
movq %r15, -0xe8(%rbp)
cmpq %r15, %rbx
je 0x298fa
movq %rsp, -0xf8(%rbp)
movq %rsp, %rdi
subq -0xf0(%rbp), %rdi
movq %rdi, %rsp
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
movq -0xd0(%rbp), %rdx
callq 0xc160
movq %rbx, -0x100(%rbp)
shlq $0x4, %rbx
movq %rbx, -0x110(%rbp)
movq -0xc8(%rbp), %r12
xorl %r15d, %r15d
cmpq %r15, -0x118(%rbp)
je 0x2945d
movq -0xd8(%rbp), %rax
leaq (%rax,%r15), %r13
movq -0x38(%rbp), %rax
leaq (%rax,%r15), %rdi
movq %r13, %rsi
callq 0x29ebe
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
leaq 0x11729(%rip), %rsi     # 0x3ab59
movq %r12, %rdx
movq %r13, %rcx
callq *0x8(%rax)
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
leaq 0xe43a(%rip), %rsi      # 0x37881
movq %r12, %rdx
movq %r13, %rcx
callq *0x8(%rax)
addq $0x8, %r15
incq %r12
leaq -0x40(%rbp), %r13
jmp 0x293fe
pushq $0x10
popq %r12
cmpq %r14, %r12
jae 0x29562
movq -0x38(%rbp), %rax
movq -0x18(%rax,%r12,8), %rax
movq %rax, -0x80(%rbp)
testq %rax, %rax
je 0x29487
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x40(%rax,%r12,8), %rax
movq %rax, -0x78(%rbp)
testq %rax, %rax
je 0x294a4
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x70(%rax,%r12,8), %rax
movq %rax, -0x70(%rbp)
testq %rax, %rax
je 0x294c1
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x80(%rax,%r12,8), %rax
movq %rax, -0x68(%rbp)
testq %rax, %rax
je 0x294de
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq %r13, %rdi
leaq -0x80(%rbp), %rsi
callq 0x29ef8
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
pushq $0x1
popq %rdx
callq 0x29ed9
movq %r13, %r15
movq -0x38(%rbp), %rax
leaq (%rax,%r12,8), %r13
movq -0x30(%rbp), %rax
movq %rax, (%r13)
andq $0x0, -0x30(%rbp)
movq %rbx, %rdi
callq 0x1bd90
movq %r15, %rdi
callq 0x1bd90
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
leaq 0xe34f(%rip), %rsi      # 0x37881
movq %r12, %rdx
movq %r13, %rcx
callq *0x8(%rax)
pushq $0x18
popq %r15
leaq (%r15,%rbp), %rdi
addq $-0x80, %rdi
callq 0x1bd90
addq $-0x8, %r15
cmpq $-0x8, %r15
jne 0x2953f
incq %r12
leaq -0x40(%rbp), %r13
jmp 0x29461
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x29580
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0xc0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x2959e
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x295bc
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
testq %rax, %rax
je 0x295da
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0xa8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
testq %rax, %rax
je 0x295fb
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
xorl %r12d, %r12d
cmpq %r14, %r12
je 0x297a9
leaq -0xa0(%rbp), %rbx
movq %rbx, %rdi
movq -0x108(%rbp), %rsi
movl %r12d, %edx
movq %r13, %rcx
leaq -0x48(%rbp), %r8
leaq -0x58(%rbp), %r9
callq 0x29f18
movq -0x110(%rbp), %rax
leaq (%rax,%r12), %r13
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
leaq 0xe204(%rip), %rsi      # 0x37848
movq %r13, %rdx
movq %rbx, %rcx
callq *0x8(%rax)
leaq -0x80(%rbp), %rdi
leaq -0x30(%rbp), %rsi
pushq $0x5
popq %rdx
callq 0x29ed9
movq -0xa0(%rbp), %rax
movq %rax, -0x78(%rbp)
testq %rax, %rax
je 0x29678
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0x88(%rbp), %rax
movq %rax, -0x70(%rbp)
testq %rax, %rax
je 0x29693
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movq -0x38(%rbp), %rax
movq (%rax,%r12,8), %rax
movq %rax, -0x68(%rbp)
testq %rax, %rax
je 0x296af
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
movl %r12d, %eax
xorl %edx, %edx
pushq $0x14
popq %rcx
divl %ecx
movq -0x140(%rbp,%rax,8), %rax
movq %rax, -0x60(%rbp)
testq %rax, %rax
je 0x296d5
movq (%rax), %rcx
movq -0x20(%rcx), %rcx
incl 0x8(%rax,%rcx)
leaq -0x98(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x29f9d
movq -0x58(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x2073c
movq -0x48(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x2073c
leaq -0xe0(%rbp), %rbx
movq %rbx, %rdi
leaq -0x40(%rbp), %r15
movq %r15, %rsi
pushq $0x1e
popq %rdx
callq 0x29ed9
movq -0xe0(%rbp), %rax
movq %rax, -0x48(%rbp)
andq $0x0, -0xe0(%rbp)
movq %rbx, %rdi
callq 0x1bd90
movq -0x30(%rbp), %rsi
movq %r15, %rdi
callq 0x2073c
movq -0x98(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x2073c
movq -0x50(%rbp), %rdi
movq (%rdi), %rax
leaq 0x11de2(%rip), %rsi     # 0x3b542
movq %r13, %rdx
leaq -0x30(%rbp), %rcx
callq *0x8(%rax)
leaq -0x98(%rbp), %rdi
callq 0x1bd90
pushq $0x20
popq %r15
leaq (%r15,%rbp), %rdi
addq $-0x80, %rdi
callq 0x1bd90
addq $-0x8, %r15
cmpq $-0x8, %r15
jne 0x2977a
leaq -0xa0(%rbp), %rdi
callq 0x1bd90
incq %r12
leaq -0x40(%rbp), %r13
jmp 0x295fe
leaq -0x80(%rbp), %r12
movq %r12, %rdi
movq -0x90(%rbp), %r15
movq %r15, %rsi
leaq -0x30(%rbp), %rdx
callq 0x29fbd
movq -0x80(%rbp), %rax
movq %rax, (%r15)
andq $0x0, -0x80(%rbp)
movq %r12, %rdi
callq 0x1bd90
movq %r12, %rdi
movq -0xc0(%rbp), %r15
movq %r15, %rsi
movq %r13, %rdx
callq 0x29fbd
movq -0x80(%rbp), %rax
movq %rax, (%r15)
andq $0x0, -0x80(%rbp)
movq %r12, %rdi
callq 0x1bd90
movq %r12, %rdi
movq -0xb8(%rbp), %r15
movq %r15, %rsi
leaq -0x48(%rbp), %rdx
callq 0x29fbd
movq -0x80(%rbp), %rax
movq %rax, (%r15)
andq $0x0, -0x80(%rbp)
movq %r12, %rdi
callq 0x1bd90
movq %r12, %rdi
movq -0xb0(%rbp), %r15
movq %r15, %rsi
leaq -0x58(%rbp), %rdx
callq 0x29fbd
movq -0x80(%rbp), %rax
movq %rax, (%r15)
andq $0x0, -0x80(%rbp)
movq %r12, %rdi
callq 0x1bd90
movq %r12, %rdi
movq -0xa8(%rbp), %r15
movq %r15, %rsi
leaq -0x88(%rbp), %rbx
movq %rbx, %rdx
callq 0x29fbd
movq -0x80(%rbp), %rax
movq %rax, (%r15)
andq $0x0, -0x80(%rbp)
movq %r12, %rdi
callq 0x1bd90
subq $-0x80, -0xd8(%rbp)
movq %rbx, %rdi
callq 0x1bd90
leaq -0x58(%rbp), %rdi
callq 0x1bd90
leaq -0x48(%rbp), %rdi
callq 0x1bd90
movq %r13, %rdi
callq 0x1bd90
leaq -0x30(%rbp), %rdi
callq 0x1bd90
movq -0x38(%rbp), %rbx
addq $-0x8, %rbx
movq -0xd0(%rbp), %r15
leaq (%rbx,%r15), %rdi
callq 0x1bd90
addq $-0x8, %r15
jne 0x298c6
movq -0xf8(%rbp), %rsp
movq -0x100(%rbp), %rbx
incq %rbx
addq $0x10, -0xc8(%rbp)
movq -0xe8(%rbp), %r15
jmp 0x293b3
leaq 0x11c43(%rip), %rsi     # 0x3b544
movq -0x50(%rbp), %rdi
movq -0x90(%rbp), %rdx
callq 0x29fe0
pushq $0x18
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0x140, %rdi           # imm = 0xFEC0
callq 0x1bd90
addq $-0x8, %rbx
cmpq $-0x8, %rbx
jne 0x29914
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11aea(%rip), %rdi     # 0x3b42e
leaq 0x11b19(%rip), %rsi     # 0x3b464
leaq 0x12ac8(%rip), %rcx     # 0x3c41a
pushq $0x34
jmp 0x2996d
leaq 0x11bba(%rip), %rdi     # 0x3b517
leaq 0x11b00(%rip), %rsi     # 0x3b464
leaq 0x12aaf(%rip), %rcx     # 0x3c41a
pushq $0x35
popq %rdx
callq 0xc180
jmp 0x2997d
jmp 0x2997d
jmp 0x2997d
jmp 0x2997d
jmp 0x2997d
movq %rax, %r15
jmp 0x29a75
jmp 0x29989
jmp 0x29989
movq %rax, %r15
addq $-0x8, %r13
movq %r13, %rdi
callq 0x1bd90
cmpq %r12, %r13
jne 0x2998c
jmp 0x29a92
jmp 0x299ac
jmp 0x299ac
jmp 0x299ac
jmp 0x299ac
jmp 0x299ac
movq %rax, %r15
jmp 0x29a2a
jmp 0x299b3
movq %rax, %r15
jmp 0x29a1e
movq %rax, %r15
jmp 0x29a03
jmp 0x299f4
jmp 0x299cf
movq %rax, %r15
leaq -0x40(%rbp), %rdi
callq 0x1bd90
jmp 0x299d2
movq %rax, %r15
pushq $0x18
popq %r12
leaq (%r12,%rbp), %rdi
addq $-0x80, %rdi
callq 0x1bd90
addq $-0x8, %r12
cmpq $-0x8, %r12
jne 0x299d6
jmp 0x29a5a
movq %rax, %r15
jmp 0x29a5a
movq %rax, %r15
leaq -0x98(%rbp), %rdi
callq 0x1bd90
pushq $0x20
popq %r12
leaq (%r12,%rbp), %rdi
addq $-0x80, %rdi
callq 0x1bd90
addq $-0x8, %r12
cmpq $-0x8, %r12
jne 0x29a07
leaq -0xa0(%rbp), %rdi
callq 0x1bd90
leaq -0x88(%rbp), %rdi
callq 0x1bd90
leaq -0x58(%rbp), %rdi
callq 0x1bd90
leaq -0x48(%rbp), %rdi
callq 0x1bd90
leaq -0x40(%rbp), %rdi
callq 0x1bd90
leaq -0x30(%rbp), %rdi
callq 0x1bd90
movq -0x38(%rbp), %rbx
addq $-0x8, %rbx
shlq $0x3, %r14
leaq (%rbx,%r14), %rdi
callq 0x1bd90
addq $-0x8, %r14
jne 0x29a66
pushq $0x18
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0x140, %rdi           # imm = 0xFEC0
callq 0x1bd90
addq $-0x8, %rbx
cmpq $-0x8, %rbx
jne 0x29a78
movq %r15, %rdi
callq 0xc4c0