// File: vsklad[P]cgen/./acl/sha.hpp
// Function: acl::SHA<32ul, 16u, bal::Literal<bal::Cnf>>::pad_message(unsigned int const*, unsigned int)
static VariablesArray pad_message(const literalid_t* const message, const variables_size_t message_size) {
            constexpr auto block_bits_size = MESSAGE_BLOCK_SIZE * WORD_SIZE;
            variables_size_t number_of_blocks = message_size / block_bits_size + 1;
            if ((message_size % block_bits_size) > 447) {
                number_of_blocks++;
            };
            
            const variables_size_t padded_words_size = number_of_blocks * MESSAGE_BLOCK_SIZE;
            const variables_size_t padded_bits_size = padded_words_size * WORD_SIZE;
            VariablesArray padded_message(padded_words_size, WORD_SIZE);
            literalid_t* data = padded_message.data();

            // copy the message
            std::copy(message, message + message_size, data);
            // append 1 bit
            data[message_size] = literal_t__constant(1);
            // append the rest with zeros except for the last 64 bits
            std::fill(data + message_size + 1, data + padded_bits_size - 64, literal_t__constant(0));
            // the last 64 bits is the message size in bits
            uint64_t message_size_ = message_size;
            for (auto i = 0; i < 64; i++) {
                data[padded_bits_size - i - 1] = message_size_ & 1;
                message_size_ >>= 1;
            };

            return padded_message;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x200, -0x20(%rbp)     # imm = 0x200
movl -0x14(%rbp), %eax
shrq $0x9, %rax
addq $0x1, %rax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
andq $0x1ff, %rax            # imm = 0x1FF
cmpq $0x1bf, %rax            # imm = 0x1BF
jbe 0x26d5e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x68(%rbp), %rdi
movl -0x24(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
shll $0x5, %eax
movl %eax, -0x2c(%rbp)
movb $0x0, -0x2d(%rbp)
movl -0x28(%rbp), %esi
movl $0x20, %edx
callq 0x10330
movq -0x68(%rbp), %rdi
callq 0x10310
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
leaq (%rdi,%rax,4), %rsi
movq -0x38(%rbp), %rdx
callq 0x13db0
jmp 0x26da8
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
movl $0x1, (%rax,%rcx,4)
movq -0x38(%rbp), %rax
movl -0x14(%rbp), %ecx
leaq 0x4(%rax,%rcx,4), %rdi
movl -0x2c(%rbp), %ecx
leaq -0x100(%rax,%rcx,4), %rsi
leaq 0x3a550(%rip), %rdx     # 0x61324
callq 0x15ae0
jmp 0x26ddb
movl -0x14(%rbp), %eax
movq %rax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
cmpl $0x40, -0x54(%rbp)
jge 0x26e38
movq -0x50(%rbp), %rax
andq $0x1, %rax
movl %eax, %edx
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
subl -0x54(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl %edx, (%rax,%rcx,4)
movq -0x50(%rbp), %rax
shrq %rax
movq %rax, -0x50(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x26de9
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x10850
jmp 0x26e55
movb $0x1, -0x2d(%rbp)
testb $0x1, -0x2d(%rbp)
jne 0x26e4b
movq -0x68(%rbp), %rdi
callq 0x10850
movq -0x60(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xd5a0
nop