// File: /workspace/github_cpp_makefile_star2_O2/s0sasaki[P]ExecutableBlockchain/sha256.cpp
// Function: SHA256::transform(unsigned char const*, unsigned int)
void SHA256::transform(const unsigned char *message, unsigned int block_nb)
{
    uint32 w[64];
    uint32 wv[8];
    uint32 t1, t2;
    const unsigned char *sub_block;
    int i;
    int j;
    for (i = 0; i < (int) block_nb; i++) {
        sub_block = message + (i << 6);
        for (j = 0; j < 16; j++) {
            SHA2_PACK32(&sub_block[j << 2], &w[j]);
        }
        for (j = 16; j < 64; j++) {
            w[j] =  SHA256_F4(w[j -  2]) + w[j -  7] + SHA256_F3(w[j - 15]) + w[j - 16];
        }
        for (j = 0; j < 8; j++) {
            wv[j] = m_h[j];
        }
        for (j = 0; j < 64; j++) {
            t1 = wv[7] + SHA256_F2(wv[4]) + SHA2_CH(wv[4], wv[5], wv[6])
                 + sha256_k[j] + w[j];
            t2 = SHA256_F1(wv[0]) + SHA2_MAJ(wv[0], wv[1], wv[2]);
            wv[7] = wv[6];
            wv[6] = wv[5];
            wv[5] = wv[4];
            wv[4] = wv[3] + t1;
            wv[3] = wv[2];
            wv[2] = wv[1];
            wv[1] = wv[0];
            wv[0] = t1 + t2;
        }
        for (j = 0; j < 8; j++) {
            m_h[j] += wv[j];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movq %rdx, -0x68(%rbp)
addq $0x3, %rsi
movq %rsi, -0x60(%rbp)
xorl %ecx, %ecx
movq %rdi, -0x58(%rbp)
cmpq -0x68(%rbp), %rcx
je 0x4d62
movq %rcx, -0x70(%rbp)
movq %rax, -0x78(%rbp)
cltq
addq -0x60(%rbp), %rax
xorl %ecx, %ecx
cmpq $0x10, %rcx
je 0x4be7
movl -0x3(%rax,%rcx,4), %edx
bswapl %edx
movl %edx, -0x180(%rbp,%rcx,4)
incq %rcx
jmp 0x4bcf
movabsq $0x10, %rax
cmpq $0x40, %rax
je 0x4c47
movl -0x188(%rbp,%rax,4), %ecx
movl %ecx, %edx
roll $0xf, %edx
movl %ecx, %esi
roll $0xd, %esi
xorl %edx, %esi
shrl $0xa, %ecx
xorl %esi, %ecx
addl -0x19c(%rbp,%rax,4), %ecx
movl -0x1bc(%rbp,%rax,4), %edx
movl %edx, %esi
roll $0x19, %esi
movl %edx, %r8d
roll $0xe, %r8d
xorl %esi, %r8d
shrl $0x3, %edx
addl -0x1c0(%rbp,%rax,4), %ecx
xorl %r8d, %edx
addl %edx, %ecx
movl %ecx, -0x180(%rbp,%rax,4)
incq %rax
jmp 0x4bf1
xorl %eax, %eax
cmpq $0x8, %rax
je 0x4c5f
movl 0x88(%rdi,%rax,4), %ecx
movl %ecx, -0x50(%rbp,%rax,4)
incq %rax
jmp 0x4c49
movl -0x34(%rbp), %eax
movl -0x40(%rbp), %r9d
movl -0x3c(%rbp), %r10d
movl -0x38(%rbp), %edx
movl -0x50(%rbp), %r12d
movl -0x4c(%rbp), %r11d
movl -0x48(%rbp), %r14d
movl -0x44(%rbp), %edi
xorl %r15d, %r15d
movl %edx, %r13d
cmpq $0x100, %r15            # imm = 0x100
je 0x4d15
movl %r9d, %ecx
movl %r9d, %ebx
movl %r9d, %esi
roll $0x1a, %esi
movl %r10d, %r8d
xorl %r13d, %r8d
andl %r9d, %r8d
roll $0x15, %ecx
movl %r10d, %edx
movl %r9d, %r10d
xorl %esi, %ecx
roll $0x7, %ebx
xorl %ecx, %ebx
addl %eax, %ebx
leaq 0x1523(%rip), %rax      # 0x61e0
addl (%r15,%rax), %ebx
xorl %r13d, %r8d
addl %r8d, %ebx
addl -0x180(%rbp,%r15), %ebx
movl %r12d, %eax
movl %r12d, %ecx
movl %r14d, %esi
movl %edi, %r9d
movl %r14d, %edi
xorl %r11d, %r14d
andl %r12d, %r14d
andl %r11d, %esi
xorl %r14d, %esi
movl %r11d, %r14d
movl %r12d, %r11d
roll $0x1e, %r12d
addl %ebx, %r9d
roll $0x13, %eax
xorl %r12d, %eax
roll $0xa, %ecx
xorl %eax, %ecx
addl %ecx, %esi
addl %ebx, %esi
addq $0x4, %r15
movl %esi, %r12d
movl %r13d, %eax
jmp 0x4c7f
movl %eax, -0x34(%rbp)
movl %r9d, -0x40(%rbp)
movl %r10d, -0x3c(%rbp)
movl %r13d, -0x38(%rbp)
movl %r12d, -0x50(%rbp)
movl %r11d, -0x4c(%rbp)
movl %r14d, -0x48(%rbp)
movl %edi, -0x44(%rbp)
xorl %eax, %eax
movq -0x58(%rbp), %rdi
cmpq $0x8, %rax
je 0x4d4f
movl -0x50(%rbp,%rax,4), %ecx
addl %ecx, 0x88(%rdi,%rax,4)
incq %rax
jmp 0x4d39
movq -0x70(%rbp), %rcx
incq %rcx
movq -0x78(%rbp), %rax
addl $0x40, %eax
jmp 0x4bb5
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq