// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/sha256.c
// Function: sha256_transform
void sha256_transform(SHA256_CTX *ctx, const uint8_t data[])
{
	uint32_t a, b, c, d, e, f, g, h, i, j, t1, t2, m[64];

	for (i = 0, j = 0; i < 16; ++i, j += 4)
		m[i] = (data[j] << 24) | (data[j + 1] << 16) | (data[j + 2] << 8) | (data[j + 3]);
	for ( ; i < 64; ++i)
		m[i] = SIG1(m[i - 2]) + m[i - 7] + SIG0(m[i - 15]) + m[i - 16];

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

	for (i = 0; i < 64; ++i) {
		t1 = h + EP1(e) + CH(e,f,g) + k[i] + m[i];
		t2 = EP0(a) + MAJ(a,b,c);
		h = g;
		g = f;
		f = e;
		e = d + t1;
		d = c;
		c = b;
		b = a;
		a = t1 + t2;
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
cmpl $0x10, -0x34(%rbp)
jae 0xa2ff
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
shll $0x18, %ecx
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movzbl (%rax,%rdx), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %edx
addl $0x2, %edx
movl %edx, %edx
movzbl (%rax,%rdx), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %edx
addl $0x3, %edx
movl %edx, %edx
movzbl (%rax,%rdx), %eax
orl %eax, %ecx
movl -0x34(%rbp), %eax
movl %ecx, -0x140(%rbp,%rax,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x38(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x38(%rbp)
jmp 0xa291
jmp 0xa301
cmpl $0x40, -0x34(%rbp)
jae 0xa407
movl -0x34(%rbp), %eax
subl $0x2, %eax
movl %eax, %eax
movl -0x140(%rbp,%rax,4), %ecx
shrl $0x11, %ecx
movl -0x34(%rbp), %eax
subl $0x2, %eax
movl %eax, %eax
movl -0x140(%rbp,%rax,4), %eax
shll $0xf, %eax
orl %eax, %ecx
movl -0x34(%rbp), %eax
subl $0x2, %eax
movl %eax, %eax
movl -0x140(%rbp,%rax,4), %eax
shrl $0x13, %eax
movl -0x34(%rbp), %edx
subl $0x2, %edx
movl %edx, %edx
movl -0x140(%rbp,%rdx,4), %edx
shll $0xd, %edx
orl %edx, %eax
xorl %eax, %ecx
movl -0x34(%rbp), %eax
subl $0x2, %eax
movl %eax, %eax
movl -0x140(%rbp,%rax,4), %eax
shrl $0xa, %eax
xorl %eax, %ecx
movl -0x34(%rbp), %eax
subl $0x7, %eax
movl %eax, %eax
addl -0x140(%rbp,%rax,4), %ecx
movl -0x34(%rbp), %eax
subl $0xf, %eax
movl %eax, %eax
movl -0x140(%rbp,%rax,4), %eax
shrl $0x7, %eax
movl -0x34(%rbp), %edx
subl $0xf, %edx
movl %edx, %edx
movl -0x140(%rbp,%rdx,4), %edx
shll $0x19, %edx
orl %edx, %eax
movl -0x34(%rbp), %edx
subl $0xf, %edx
movl %edx, %edx
movl -0x140(%rbp,%rdx,4), %edx
shrl $0x12, %edx
movl -0x34(%rbp), %esi
subl $0xf, %esi
movl %esi, %esi
movl -0x140(%rbp,%rsi,4), %esi
shll $0xe, %esi
orl %esi, %edx
xorl %edx, %eax
movl -0x34(%rbp), %edx
subl $0xf, %edx
movl %edx, %edx
movl -0x140(%rbp,%rdx,4), %edx
shrl $0x3, %edx
xorl %edx, %eax
addl %eax, %ecx
movl -0x34(%rbp), %eax
subl $0x10, %eax
movl %eax, %eax
addl -0x140(%rbp,%rax,4), %ecx
movl -0x34(%rbp), %eax
movl %ecx, -0x140(%rbp,%rax,4)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa301
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x64(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x6c(%rax), %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x40, -0x34(%rbp)
jae 0xa557
movl -0x30(%rbp), %eax
movl -0x24(%rbp), %ecx
shrl $0x6, %ecx
movl -0x24(%rbp), %edx
shll $0x1a, %edx
orl %edx, %ecx
movl -0x24(%rbp), %edx
shrl $0xb, %edx
movl -0x24(%rbp), %esi
shll $0x15, %esi
orl %esi, %edx
xorl %edx, %ecx
movl -0x24(%rbp), %edx
shrl $0x19, %edx
movl -0x24(%rbp), %esi
shll $0x7, %esi
orl %esi, %edx
xorl %edx, %ecx
addl %ecx, %eax
movl -0x24(%rbp), %ecx
andl -0x28(%rbp), %ecx
movl -0x24(%rbp), %edx
xorl $-0x1, %edx
andl -0x2c(%rbp), %edx
xorl %edx, %ecx
addl %ecx, %eax
movl -0x34(%rbp), %ecx
movl %ecx, %edx
leaq 0x1bc6(%rip), %rcx      # 0xc080
addl (%rcx,%rdx,4), %eax
movl -0x34(%rbp), %ecx
addl -0x140(%rbp,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x14(%rbp), %eax
shrl $0x2, %eax
movl -0x14(%rbp), %ecx
shll $0x1e, %ecx
orl %ecx, %eax
movl -0x14(%rbp), %ecx
shrl $0xd, %ecx
movl -0x14(%rbp), %edx
shll $0x13, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x14(%rbp), %ecx
shrl $0x16, %ecx
movl -0x14(%rbp), %edx
shll $0xa, %edx
orl %edx, %ecx
xorl %ecx, %eax
movl -0x14(%rbp), %ecx
andl -0x18(%rbp), %ecx
movl -0x14(%rbp), %edx
andl -0x1c(%rbp), %edx
xorl %edx, %ecx
movl -0x18(%rbp), %edx
andl -0x1c(%rbp), %edx
xorl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x40(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
addl -0x3c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x3c(%rbp), %eax
addl -0x40(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa45e
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x50(%rax), %ecx
movl %ecx, 0x50(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x54(%rax), %ecx
movl %ecx, 0x54(%rax)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x5c(%rax), %ecx
movl %ecx, 0x5c(%rax)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x60(%rax), %ecx
movl %ecx, 0x60(%rax)
movl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x64(%rax), %ecx
movl %ecx, 0x64(%rax)
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x68(%rax), %ecx
movl %ecx, 0x68(%rax)
movl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x6c(%rax), %ecx
movl %ecx, 0x6c(%rax)
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)