// File: /workspace/github_c_makefile_star2_O0/ls4154[P]hash-c/sha224.c
// Function: sha224_iterate
static void _sha224_iterate(struct sha224_ctx *ctx, byte_t *chunk)
{
	word_t w[64];

	for (int i = 0; i < 16; ++i) {
		w[i] = 0;
		for (int j = 0; j < 4; ++j)
			w[i] |= (word_t)*(chunk + 4 * i + j) << 8 * (3 - j);
	}

	for (int i = 16; i < 64; ++i) {
		word_t s0 = ROR(w[i - 15], 7) ^ ROR(w[i - 15], 18) ^ SHR(w[i - 15], 3);
		word_t s1 = ROR(w[i - 2], 17) ^ ROR(w[i - 2], 19) ^ SHR(w[i - 2], 10);
		w[i] = w[i - 16] + s0 + w[i - 7] + s1;
	}

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

	for (int i = 0; i < 64; ++i) {
		word_t s1 = ROR(e, 6) ^ ROR(e, 11) ^ ROR(e, 25);
		word_t ch = (e & f) ^ ((~e) & g);
		word_t tmp1 = h + s1 + ch + k[i] + w[i];
		word_t s0 = ROR(a, 2) ^ ROR(a, 13) ^ ROR(a, 22);
		word_t maj = (a & b) ^ (a & c) ^ (b & c);
		word_t tmp2 = s0 + maj;

		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;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x114(%rbp)
cmpl $0x10, -0x114(%rbp)
jge 0x143b
movslq -0x114(%rbp), %rax
movl $0x0, -0x110(%rbp,%rax,4)
movl $0x0, -0x118(%rbp)
cmpl $0x4, -0x118(%rbp)
jge 0x1425
movq -0x10(%rbp), %rax
movl -0x114(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movslq -0x118(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl $0x3, %ecx
subl -0x118(%rbp), %ecx
shll $0x3, %ecx
shll %cl, %eax
movl %eax, %ecx
movslq -0x114(%rbp), %rax
orl -0x110(%rbp,%rax,4), %ecx
movl %ecx, -0x110(%rbp,%rax,4)
movl -0x118(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x118(%rbp)
jmp 0x13c6
jmp 0x1427
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x139d
movl $0x10, -0x11c(%rbp)
cmpl $0x40, -0x11c(%rbp)
jge 0x159a
movl -0x11c(%rbp), %eax
subl $0xf, %eax
cltq
movl -0x110(%rbp,%rax,4), %eax
shrl $0x7, %eax
movl -0x11c(%rbp), %ecx
subl $0xf, %ecx
movslq %ecx, %rcx
movl -0x110(%rbp,%rcx,4), %ecx
shll $0x19, %ecx
orl %ecx, %eax
movl -0x11c(%rbp), %ecx
subl $0xf, %ecx
movslq %ecx, %rcx
movl -0x110(%rbp,%rcx,4), %ecx
shrl $0x12, %ecx
movl -0x11c(%rbp), %edx
subl $0xf, %edx
movslq %edx, %rdx
movl -0x110(%rbp,%rdx,4), %edx
shll $0xe, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x11c(%rbp), %ecx
subl $0xf, %ecx
movslq %ecx, %rcx
movl -0x110(%rbp,%rcx,4), %ecx
shrl $0x3, %ecx
xorl %ecx, %eax
movl %eax, -0x120(%rbp)
movl -0x11c(%rbp), %eax
subl $0x2, %eax
cltq
movl -0x110(%rbp,%rax,4), %eax
shrl $0x11, %eax
movl -0x11c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl -0x110(%rbp,%rcx,4), %ecx
shll $0xf, %ecx
orl %ecx, %eax
movl -0x11c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl -0x110(%rbp,%rcx,4), %ecx
shrl $0x13, %ecx
movl -0x11c(%rbp), %edx
subl $0x2, %edx
movslq %edx, %rdx
movl -0x110(%rbp,%rdx,4), %edx
shll $0xd, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x11c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movl -0x110(%rbp,%rcx,4), %ecx
shrl $0xa, %ecx
xorl %ecx, %eax
movl %eax, -0x124(%rbp)
movl -0x11c(%rbp), %eax
subl $0x10, %eax
cltq
movl -0x110(%rbp,%rax,4), %ecx
addl -0x120(%rbp), %ecx
movl -0x11c(%rbp), %eax
subl $0x7, %eax
cltq
addl -0x110(%rbp,%rax,4), %ecx
addl -0x124(%rbp), %ecx
movslq -0x11c(%rbp), %rax
movl %ecx, -0x110(%rbp,%rax,4)
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x1445
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x128(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x12c(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x130(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x134(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x138(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x13c(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x140(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x144(%rbp)
movl $0x0, -0x148(%rbp)
cmpl $0x40, -0x148(%rbp)
jge 0x17be
movl -0x138(%rbp), %eax
shrl $0x6, %eax
movl -0x138(%rbp), %ecx
shll $0x1a, %ecx
orl %ecx, %eax
movl -0x138(%rbp), %ecx
shrl $0xb, %ecx
movl -0x138(%rbp), %edx
shll $0x15, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x138(%rbp), %ecx
shrl $0x19, %ecx
movl -0x138(%rbp), %edx
shll $0x7, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl %eax, -0x14c(%rbp)
movl -0x138(%rbp), %eax
andl -0x13c(%rbp), %eax
movl -0x138(%rbp), %ecx
xorl $-0x1, %ecx
andl -0x140(%rbp), %ecx
xorl %ecx, %eax
movl %eax, -0x150(%rbp)
movl -0x144(%rbp), %eax
addl -0x14c(%rbp), %eax
addl -0x150(%rbp), %eax
movslq -0x148(%rbp), %rdx
leaq 0x98f(%rip), %rcx       # 0x2030
addl (%rcx,%rdx,4), %eax
movslq -0x148(%rbp), %rcx
addl -0x110(%rbp,%rcx,4), %eax
movl %eax, -0x154(%rbp)
movl -0x128(%rbp), %eax
shrl $0x2, %eax
movl -0x128(%rbp), %ecx
shll $0x1e, %ecx
orl %ecx, %eax
movl -0x128(%rbp), %ecx
shrl $0xd, %ecx
movl -0x128(%rbp), %edx
shll $0x13, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x128(%rbp), %ecx
shrl $0x16, %ecx
movl -0x128(%rbp), %edx
shll $0xa, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl %eax, -0x158(%rbp)
movl -0x128(%rbp), %eax
andl -0x12c(%rbp), %eax
movl -0x128(%rbp), %ecx
andl -0x130(%rbp), %ecx
xorl %ecx, %eax
movl -0x12c(%rbp), %ecx
andl -0x130(%rbp), %ecx
xorl %ecx, %eax
movl %eax, -0x15c(%rbp)
movl -0x158(%rbp), %eax
addl -0x15c(%rbp), %eax
movl %eax, -0x160(%rbp)
movl -0x140(%rbp), %eax
movl %eax, -0x144(%rbp)
movl -0x13c(%rbp), %eax
movl %eax, -0x140(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x13c(%rbp)
movl -0x134(%rbp), %eax
addl -0x154(%rbp), %eax
movl %eax, -0x138(%rbp)
movl -0x130(%rbp), %eax
movl %eax, -0x134(%rbp)
movl -0x12c(%rbp), %eax
movl %eax, -0x130(%rbp)
movl -0x128(%rbp), %eax
movl %eax, -0x12c(%rbp)
movl -0x154(%rbp), %eax
addl -0x160(%rbp), %eax
movl %eax, -0x128(%rbp)
movl -0x148(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x148(%rbp)
jmp 0x160b
movl -0x128(%rbp), %ecx
movq -0x8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x12c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x130(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x134(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x138(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movl -0x13c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
movl -0x140(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x18(%rax), %ecx
movl %ecx, 0x18(%rax)
movl -0x144(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)