// File: theuni[P]libutreexo/crypto/sha256_avx2.cpp
// Function: sha256d64_avx2::(anonymous namespace)::Read8(unsigned char const*, int)
__m256i inline Read8(const unsigned char* chunk, int offset) {
    __m256i ret = _mm256_set_epi32(
        ReadLE32(chunk + 0 + offset),
        ReadLE32(chunk + 64 + offset),
        ReadLE32(chunk + 128 + offset),
        ReadLE32(chunk + 192 + offset),
        ReadLE32(chunk + 256 + offset),
        ReadLE32(chunk + 320 + offset),
        ReadLE32(chunk + 384 + offset),
        ReadLE32(chunk + 448 + offset)
    );
    return _mm256_shuffle_epi8(ret, _mm256_set_epi32(0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL, 0x0C0D0E0FUL, 0x08090A0BUL, 0x04050607UL, 0x00010203UL));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, 0x58(%rsp)
movl %esi, 0x54(%rsp)
movq 0x58(%rsp), %rdi
movslq 0x54(%rsp), %rax
addq %rax, %rdi
callq 0x28660
movl %eax, 0x4(%rsp)
movq 0x58(%rsp), %rax
movslq 0x54(%rsp), %rcx
leaq 0x40(%rax,%rcx), %rdi
callq 0x28660
movl %eax, 0x8(%rsp)
movq 0x58(%rsp), %rax
movslq 0x54(%rsp), %rcx
leaq 0x80(%rax,%rcx), %rdi
callq 0x28660
movl %eax, 0xc(%rsp)
movq 0x58(%rsp), %rax
movslq 0x54(%rsp), %rcx
leaq 0xc0(%rax,%rcx), %rdi
callq 0x28660
movl %eax, 0x10(%rsp)
movq 0x58(%rsp), %rax
movslq 0x54(%rsp), %rcx
leaq 0x100(%rax,%rcx), %rdi
callq 0x28660
movl %eax, 0x14(%rsp)
movq 0x58(%rsp), %rax
movslq 0x54(%rsp), %rcx
leaq 0x140(%rax,%rcx), %rdi
callq 0x28660
movl %eax, 0x18(%rsp)
movq 0x58(%rsp), %rax
movslq 0x54(%rsp), %rcx
leaq 0x180(%rax,%rcx), %rdi
callq 0x28660
movl %eax, 0x1c(%rsp)
movq 0x58(%rsp), %rax
movslq 0x54(%rsp), %rcx
leaq 0x1c0(%rax,%rcx), %rdi
callq 0x28660
movl 0x4(%rsp), %r10d
movl 0x8(%rsp), %r9d
movl 0xc(%rsp), %r8d
movl 0x10(%rsp), %edi
movl 0x14(%rsp), %esi
movl 0x18(%rsp), %edx
movl 0x1c(%rsp), %ecx
movl %r10d, 0xdc(%rsp)
movl %r9d, 0xd8(%rsp)
movl %r8d, 0xd4(%rsp)
movl %edi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movl %edx, 0xc8(%rsp)
movl %ecx, 0xc4(%rsp)
movl %eax, 0xc0(%rsp)
movl 0xc4(%rsp), %r8d
movl 0xc8(%rsp), %edi
movl 0xcc(%rsp), %esi
movl 0xd4(%rsp), %edx
movl 0xd8(%rsp), %ecx
movl 0xdc(%rsp), %eax
vmovd 0xc0(%rsp), %xmm0
vpinsrd $0x1, %r8d, %xmm0, %xmm0
vpinsrd $0x2, %edi, %xmm0, %xmm0
vpinsrd $0x3, %esi, %xmm0, %xmm0
vmovd 0xd0(%rsp), %xmm1
vpinsrd $0x1, %edx, %xmm1, %xmm1
vpinsrd $0x2, %ecx, %xmm1, %xmm1
vpinsrd $0x3, %eax, %xmm1, %xmm1
vmovdqa %xmm1, 0xb0(%rsp)
vmovdqa %xmm0, 0xa0(%rsp)
vmovaps 0xa0(%rsp), %ymm0
vmovaps %ymm0, 0x20(%rsp)
vmovaps 0x20(%rsp), %ymm1
movl $0xc0d0e0f, 0x9c(%rsp) # imm = 0xC0D0E0F
movl $0x8090a0b, 0x98(%rsp) # imm = 0x8090A0B
movl $0x4050607, 0x94(%rsp) # imm = 0x4050607
movl $0x10203, 0x90(%rsp) # imm = 0x10203
movl $0xc0d0e0f, 0x8c(%rsp) # imm = 0xC0D0E0F
movl $0x8090a0b, 0x88(%rsp) # imm = 0x8090A0B
movl $0x4050607, 0x84(%rsp) # imm = 0x4050607
movl $0x10203, 0x80(%rsp) # imm = 0x10203
movl 0x84(%rsp), %edx
movl 0x88(%rsp), %ecx
movl 0x8c(%rsp), %eax
movl 0x94(%rsp), %r8d
movl 0x98(%rsp), %edi
movl 0x9c(%rsp), %esi
vmovd 0x90(%rsp), %xmm0
vpinsrd $0x1, %r8d, %xmm0, %xmm0
vpinsrd $0x2, %edi, %xmm0, %xmm0
vpinsrd $0x3, %esi, %xmm0, %xmm2
vmovd 0x80(%rsp), %xmm0
vpinsrd $0x1, %edx, %xmm0, %xmm0
vpinsrd $0x2, %ecx, %xmm0, %xmm0
vpinsrd $0x3, %eax, %xmm0, %xmm3
vmovaps %xmm3, %xmm0
vinserti128 $0x1, %xmm2, %ymm0, %ymm0
vmovdqa %ymm0, 0x60(%rsp)
vmovdqa 0x60(%rsp), %ymm0
vmovdqa %ymm1, 0x100(%rsp)
vmovdqa %ymm0, 0xe0(%rsp)
vmovdqa 0x100(%rsp), %ymm0
vmovdqa 0xe0(%rsp), %ymm1
vpshufb %ymm1, %ymm0, %ymm0
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)