// File: zhjw1998[P]Merkle-Tree/src/../include/picosha2.h
// Function: void picosha2::detail::hash256_block<unsigned long*, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>>(unsigned long*, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>)
void hash256_block(RaIter1 message_digest, RaIter2 first, RaIter2 last) {
    assert(first + 64 == last);
    static_cast<void>(last);  // for avoiding unused-variable warning
    word_t w[64];
    std::fill(w, w + 64, 0);
    for (std::size_t i = 0; i < 16; ++i) {
        w[i] = (static_cast<word_t>(mask_8bit(*(first + i * 4))) << 24) |
               (static_cast<word_t>(mask_8bit(*(first + i * 4 + 1))) << 16) |
               (static_cast<word_t>(mask_8bit(*(first + i * 4 + 2))) << 8) |
               (static_cast<word_t>(mask_8bit(*(first + i * 4 + 3))));
    }
    for (std::size_t i = 16; i < 64; ++i) {
        w[i] = mask_32bit(ssig1(w[i - 2]) + w[i - 7] + ssig0(w[i - 15]) +
                          w[i - 16]);
    }

    word_t a = *message_digest;
    word_t b = *(message_digest + 1);
    word_t c = *(message_digest + 2);
    word_t d = *(message_digest + 3);
    word_t e = *(message_digest + 4);
    word_t f = *(message_digest + 5);
    word_t g = *(message_digest + 6);
    word_t h = *(message_digest + 7);

    for (std::size_t i = 0; i < 64; ++i) {
        word_t temp1 = h + bsig1(e) + ch(e, f, g) + add_constant[i] + w[i];
        word_t temp2 = bsig0(a) + maj(a, b, c);
        h = g;
        g = f;
        f = e;
        e = mask_32bit(d + temp1);
        d = c;
        c = b;
        b = a;
        a = mask_32bit(temp1 + temp2);
    }
    *message_digest += a;
    *(message_digest + 1) += b;
    *(message_digest + 2) += c;
    *(message_digest + 3) += d;
    *(message_digest + 4) += e;
    *(message_digest + 5) += f;
    *(message_digest + 6) += g;
    *(message_digest + 7) += h;
    for (std::size_t i = 0; i < 8; ++i) {
        *(message_digest + i) = mask_32bit(*(message_digest + i));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
leaq -0x8(%rbp), %rdi
movl $0x40, %esi
callq 0x5780
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x63d0
testb $0x1, %al
jne 0x51dc
jmp 0x51de
jmp 0x51fd
leaq 0xb015(%rip), %rdi      # 0x101fa
leaq 0xb021(%rip), %rsi      # 0x1020d
movl $0x5d, %edx
leaq 0xb02f(%rip), %rcx      # 0x10227
callq 0x2100
leaq -0x220(%rbp), %rdi
leaq -0x220(%rbp), %rsi
addq $0x200, %rsi            # imm = 0x200
movl $0x0, -0x224(%rbp)
leaq -0x224(%rbp), %rdx
callq 0x4b70
movq $0x0, -0x230(%rbp)
cmpq $0x10, -0x230(%rbp)
jae 0x53ba
movq -0x230(%rbp), %rsi
shlq $0x2, %rsi
leaq -0x8(%rbp), %rdi
callq 0x5780
movq %rax, -0x238(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x6390
movzbl (%rax), %edi
callq 0x6410
movzbl %al, %eax
shlq $0x18, %rax
movq %rax, -0x2e8(%rbp)
movq -0x230(%rbp), %rsi
shlq $0x2, %rsi
leaq -0x8(%rbp), %rdi
callq 0x5780
movq %rax, -0x248(%rbp)
leaq -0x248(%rbp), %rdi
movl $0x1, %esi
callq 0x5780
movq %rax, -0x240(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x6390
movzbl (%rax), %edi
callq 0x6410
movb %al, %cl
movq -0x2e8(%rbp), %rax
movzbl %cl, %ecx
shlq $0x10, %rcx
orq %rcx, %rax
movq %rax, -0x2e0(%rbp)
movq -0x230(%rbp), %rsi
shlq $0x2, %rsi
leaq -0x8(%rbp), %rdi
callq 0x5780
movq %rax, -0x258(%rbp)
leaq -0x258(%rbp), %rdi
movl $0x2, %esi
callq 0x5780
movq %rax, -0x250(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x6390
movzbl (%rax), %edi
callq 0x6410
movb %al, %cl
movq -0x2e0(%rbp), %rax
movzbl %cl, %ecx
shlq $0x8, %rcx
orq %rcx, %rax
movq %rax, -0x2d8(%rbp)
movq -0x230(%rbp), %rsi
shlq $0x2, %rsi
leaq -0x8(%rbp), %rdi
callq 0x5780
movq %rax, -0x268(%rbp)
leaq -0x268(%rbp), %rdi
movl $0x3, %esi
callq 0x5780
movq %rax, -0x260(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x6390
movzbl (%rax), %edi
callq 0x6410
movq -0x2d8(%rbp), %rcx
movzbl %al, %eax
orq %rax, %rcx
movq -0x230(%rbp), %rax
movq %rcx, -0x220(%rbp,%rax,8)
movq -0x230(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0x5233
movq $0x10, -0x270(%rbp)
cmpq $0x40, -0x270(%rbp)
jae 0x5468
movq -0x270(%rbp), %rax
subq $0x2, %rax
movq -0x220(%rbp,%rax,8), %rdi
callq 0x6450
movq -0x270(%rbp), %rcx
subq $0x7, %rcx
addq -0x220(%rbp,%rcx,8), %rax
movq %rax, -0x2f0(%rbp)
movq -0x270(%rbp), %rax
subq $0xf, %rax
movq -0x220(%rbp,%rax,8), %rdi
callq 0x64b0
movq -0x2f0(%rbp), %rdi
addq %rax, %rdi
movq -0x270(%rbp), %rax
subq $0x10, %rax
addq -0x220(%rbp,%rax,8), %rdi
callq 0x6430
movq %rax, %rcx
movq -0x270(%rbp), %rax
movq %rcx, -0x220(%rbp,%rax,8)
movq -0x270(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x270(%rbp)
jmp 0x53c5
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x278(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x280(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x288(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x290(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x298(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x2a0(%rbp)
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x2a8(%rbp)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x2b0(%rbp)
movq $0x0, -0x2b8(%rbp)
cmpq $0x40, -0x2b8(%rbp)
jae 0x5655
movq -0x2b0(%rbp), %rax
movq %rax, -0x308(%rbp)
movq -0x298(%rbp), %rdi
callq 0x6510
movq %rax, %rcx
movq -0x308(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x300(%rbp)
movq -0x298(%rbp), %rdi
movq -0x2a0(%rbp), %rsi
movq -0x2a8(%rbp), %rdx
callq 0x6570
movq %rax, %rcx
movq -0x300(%rbp), %rax
addq %rcx, %rax
movq -0x2b8(%rbp), %rdx
leaq 0xaf05(%rip), %rcx      # 0x10460
addq (%rcx,%rdx,8), %rax
movq -0x2b8(%rbp), %rcx
addq -0x220(%rbp,%rcx,8), %rax
movq %rax, -0x2c0(%rbp)
movq -0x278(%rbp), %rdi
callq 0x65a0
movq %rax, -0x2f8(%rbp)
movq -0x278(%rbp), %rdi
movq -0x280(%rbp), %rsi
movq -0x288(%rbp), %rdx
callq 0x6600
movq %rax, %rcx
movq -0x2f8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x2c8(%rbp)
movq -0x2a8(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x2a0(%rbp), %rax
movq %rax, -0x2a8(%rbp)
movq -0x298(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq -0x290(%rbp), %rdi
addq -0x2c0(%rbp), %rdi
callq 0x6430
movq %rax, -0x298(%rbp)
movq -0x288(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x278(%rbp), %rax
movq %rax, -0x280(%rbp)
movq -0x2c0(%rbp), %rdi
addq -0x2c8(%rbp), %rdi
callq 0x6430
movq %rax, -0x278(%rbp)
movq -0x2b8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2b8(%rbp)
jmp 0x54ea
movq -0x278(%rbp), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x280(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x288(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x290(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movq -0x298(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
movq -0x2a0(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x2a8(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x2b0(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x38(%rax), %rcx
movq %rcx, 0x38(%rax)
movq $0x0, -0x2d0(%rbp)
cmpq $0x8, -0x2d0(%rbp)
jae 0x573a
movq -0x18(%rbp), %rax
movq -0x2d0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x6430
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq -0x2d0(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x2d0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x2d0(%rbp)
jmp 0x56f6
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)