// File: /workspace/github_c_makefile_star2_O0/dubeyalok7[P]crypto-algo/sha/sha256.c
// Function: sha256Process
static void sha256Process(SHA256Context *ctx)
{
    /* Constants defined in FIPS 180-3, section 4.2.2 */
    static const uint32_t k[64] = {
        0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,
        0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,
        0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,
        0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
        0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,
        0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
        0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,
        0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
        0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,
        0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,
        0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,
        0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
        0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
    };

    int t, t4;
    uint32_t tmp1, tmp2;
    uint32_t w[64];
    uint32_t a,b,c,d,e,f,g,h;

    /* Initialize the first 16 words in the array */
    for(t = t4 = 0; t< 16; t++, t4+=4)
    {
        w[t] = (((uint32_t)ctx->msg_block[t4]) << 24) |
            (((uint32_t)ctx->msg_block[t4 + 1]) << 16) |
            (((uint32_t)ctx->msg_block[t4 + 2]) << 8) |
            (((uint32_t)ctx->msg_block[t4 + 3]));
    }

    for(t = 16; t<64; ++t)
        w[t] = SSIG1(w[t-2]) + w[t-7] + SSIG0(w[t-15]) + w[t-16];

    a = ctx->h[0];
    b = ctx->h[1];
    c = ctx->h[2];
    d = ctx->h[3];
    e = ctx->h[4];
    f = ctx->h[5];
    g = ctx->h[6];
    h = ctx->h[7];

    for(int t = 0; t< 64; ++t) {
        tmp1 = h + SSIG1(e) + SHA256_CH(e, f, g) + k[t] + w[t];
        tmp2 = SSIG0(a) + SHA256_MAJ(a, b, c);
        h = g;
        g = f;
        f = e;
        e = d + tmp1;
        d = c;
        c = b;
        b = a;
        a = tmp1 + tmp2;
    }

    ctx->h[0] += a;
    ctx->h[1] += b;
    ctx->h[2] += c;
    ctx->h[3] += d;
    ctx->h[4] += e;
    ctx->h[5] += f;
    ctx->h[6] += g;
    ctx->h[7] += h;

    ctx->msg_block_idx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x10, -0xc(%rbp)
jge 0x1464
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movzbl 0x2a(%rax,%rcx), %ecx
shll $0x18, %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movzbl 0x2a(%rax,%rdx), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movzbl 0x2a(%rax,%rdx), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movzbl 0x2a(%rax,%rdx), %eax
orl %eax, %ecx
movslq -0xc(%rbp), %rax
movl %ecx, -0x120(%rbp,%rax,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x10(%rbp)
jmp 0x13ed
movl $0x10, -0xc(%rbp)
cmpl $0x40, -0xc(%rbp)
jge 0x15a1
movl -0xc(%rbp), %eax
subl $0x2, %eax
cltq
movl -0x120(%rbp,%rax,4), %ecx
shrl $0x11, %ecx
movl -0xc(%rbp), %eax
subl $0x2, %eax
cltq
movl -0x120(%rbp,%rax,4), %eax
shll $0xf, %eax
orl %eax, %ecx
movl -0xc(%rbp), %eax
subl $0x2, %eax
cltq
movl -0x120(%rbp,%rax,4), %eax
shrl $0x13, %eax
movl -0xc(%rbp), %edx
subl $0x2, %edx
movslq %edx, %rdx
movl -0x120(%rbp,%rdx,4), %edx
shll $0xd, %edx
orl %edx, %eax
xorl %eax, %ecx
movl -0xc(%rbp), %eax
subl $0x2, %eax
cltq
movl -0x120(%rbp,%rax,4), %eax
shrl $0xa, %eax
movl -0xc(%rbp), %edx
subl $0x2, %edx
movslq %edx, %rdx
movl -0x120(%rbp,%rdx,4), %edx
shll $0x16, %edx
orl %edx, %eax
xorl %eax, %ecx
movl -0xc(%rbp), %eax
subl $0x7, %eax
cltq
addl -0x120(%rbp,%rax,4), %ecx
movl -0xc(%rbp), %eax
subl $0xf, %eax
cltq
movl -0x120(%rbp,%rax,4), %eax
shrl $0x7, %eax
movl -0xc(%rbp), %edx
subl $0xf, %edx
movslq %edx, %rdx
movl -0x120(%rbp,%rdx,4), %edx
shll $0x19, %edx
orl %edx, %eax
movl -0xc(%rbp), %edx
subl $0xf, %edx
movslq %edx, %rdx
movl -0x120(%rbp,%rdx,4), %edx
shrl $0x12, %edx
movl -0xc(%rbp), %esi
subl $0xf, %esi
movslq %esi, %rsi
movl -0x120(%rbp,%rsi,4), %esi
shll $0xe, %esi
orl %esi, %edx
xorl %edx, %eax
movl -0xc(%rbp), %edx
subl $0xf, %edx
movslq %edx, %rdx
movl -0x120(%rbp,%rdx,4), %edx
shrl $0x3, %edx
movl -0xc(%rbp), %esi
subl $0xf, %esi
movslq %esi, %rsi
movl -0x120(%rbp,%rsi,4), %esi
shll $0x1d, %esi
orl %esi, %edx
xorl %edx, %eax
addl %eax, %ecx
movl -0xc(%rbp), %eax
subl $0x10, %eax
cltq
addl -0x120(%rbp,%rax,4), %ecx
movslq -0xc(%rbp), %rax
movl %ecx, -0x120(%rbp,%rax,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x146b
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x124(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x128(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x12c(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x130(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x134(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x138(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x13c(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x140(%rbp)
movl $0x0, -0x144(%rbp)
cmpl $0x40, -0x144(%rbp)
jge 0x178c
movl -0x140(%rbp), %eax
movl -0x134(%rbp), %ecx
shrl $0x11, %ecx
movl -0x134(%rbp), %edx
shll $0xf, %edx
orl %edx, %ecx
movl -0x134(%rbp), %edx
shrl $0x13, %edx
movl -0x134(%rbp), %esi
shll $0xd, %esi
orl %esi, %edx
xorl %edx, %ecx
movl -0x134(%rbp), %edx
shrl $0xa, %edx
movl -0x134(%rbp), %esi
shll $0x16, %esi
orl %esi, %edx
xorl %edx, %ecx
addl %ecx, %eax
movl -0x134(%rbp), %ecx
andl -0x138(%rbp), %ecx
movl -0x134(%rbp), %edx
xorl $-0x1, %edx
andl -0x13c(%rbp), %edx
xorl %edx, %ecx
addl %ecx, %eax
movslq -0x144(%rbp), %rdx
leaq 0x97c(%rip), %rcx       # 0x2010
addl (%rcx,%rdx,4), %eax
movslq -0x144(%rbp), %rcx
addl -0x120(%rbp,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movl -0x124(%rbp), %eax
shrl $0x7, %eax
movl -0x124(%rbp), %ecx
shll $0x19, %ecx
orl %ecx, %eax
movl -0x124(%rbp), %ecx
shrl $0x12, %ecx
movl -0x124(%rbp), %edx
shll $0xe, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x124(%rbp), %ecx
shrl $0x3, %ecx
movl -0x124(%rbp), %edx
shll $0x1d, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x124(%rbp), %ecx
andl -0x128(%rbp), %ecx
movl -0x128(%rbp), %edx
andl -0x12c(%rbp), %edx
xorl %edx, %ecx
movl -0x12c(%rbp), %edx
andl -0x124(%rbp), %edx
xorl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x13c(%rbp), %eax
movl %eax, -0x140(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x13c(%rbp)
movl -0x134(%rbp), %eax
movl %eax, -0x138(%rbp)
movl -0x130(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x134(%rbp)
movl -0x12c(%rbp), %eax
movl %eax, -0x130(%rbp)
movl -0x128(%rbp), %eax
movl %eax, -0x12c(%rbp)
movl -0x124(%rbp), %eax
movl %eax, -0x128(%rbp)
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x124(%rbp)
movl -0x144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0x1612
movl -0x124(%rbp), %ecx
movq -0x8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x128(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x12c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x130(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x134(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movl -0x138(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movl -0x13c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x18(%rax), %ecx
movl %ecx, 0x18(%rax)
movl -0x140(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x28(%rax)
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)