// File: /workspace/github_c_makefile_star2_O0/aerospike[P]aerospike-common/src/main/citrusleaf/cf_crypto.c
// Function: cf_SHA1ProcessMessageBlock
static void
cf_SHA1ProcessMessageBlock(cf_SHA1Context *context)
{
	const uint32_t K[] = {
			0x5A827999,
			0x6ED9EBA1,
			0x8F1BBCDC,
			0xCA62C1D6
	};

	int t;
	uint32_t temp;
	uint32_t W[80];
	uint32_t A, B, C, D, E;

	for (t = 0; t < 16; t++) {
		W[t] = (uint32_t)(context->Message_Block[t * 4]) << 24;
		W[t] |= (uint32_t)(context->Message_Block[t * 4 + 1]) << 16;
		W[t] |= context->Message_Block[t * 4 + 2] << 8;
		W[t] |= context->Message_Block[t * 4 + 3];
	}

	for (t = 16; t < 80; t++) {
		W[t] = cf_SHA1CircularShift(1,
				W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16]);
	}

	A = context->Intermediate_Hash[0];
	B = context->Intermediate_Hash[1];
	C = context->Intermediate_Hash[2];
	D = context->Intermediate_Hash[3];
	E = context->Intermediate_Hash[4];

	for (t = 0; t < 20; t++) {
		temp = cf_SHA1CircularShift(5, A) +
				((B & C) | ((~B) & D)) + E + W[t] + K[0];
		E = D;
		D = C;
		C = cf_SHA1CircularShift(30, B);
		B = A;
		A = temp;
	}

	for (t = 20; t < 40; t++) {
		temp = cf_SHA1CircularShift(5, A) + (B ^ C ^ D) + E + W[t] + K[1];
		E = D;
		D = C;
		C = cf_SHA1CircularShift(30, B);
		B = A;
		A = temp;
	}

	for (t = 40; t < 60; t++) {
		temp = cf_SHA1CircularShift(5, A) +
				((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
		E = D;
		D = C;
		C = cf_SHA1CircularShift(30, B);
		B = A;
		A = temp;
	}

	for (t = 60; t < 80; t++) {
		temp = cf_SHA1CircularShift(5, A) + (B ^ C ^ D) + E + W[t] + K[3];
		E = D;
		D = C;
		C = cf_SHA1CircularShift(30, B);
		B = A;
		A = temp;
	}

	context->Intermediate_Hash[0] += A;
	context->Intermediate_Hash[1] += B;
	context->Intermediate_Hash[2] += C;
	context->Intermediate_Hash[3] += D;
	context->Intermediate_Hash[4] += E;

	context->Message_Block_Index = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq 0x3a5a(%rip), %rax      # 0x277e0
movq %rax, -0x20(%rbp)
movq 0x3a57(%rip), %rax      # 0x277e8
movq %rax, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x10, -0x24(%rbp)
jge 0x23e4f
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movzbl 0x1e(%rax,%rcx), %ecx
shll $0x18, %ecx
movslq -0x24(%rbp), %rax
movl %ecx, -0x170(%rbp,%rax,4)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl 0x1e(%rax,%rcx), %ecx
shll $0x10, %ecx
movslq -0x24(%rbp), %rax
orl -0x170(%rbp,%rax,4), %ecx
movl %ecx, -0x170(%rbp,%rax,4)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl 0x1e(%rax,%rcx), %ecx
shll $0x8, %ecx
movslq -0x24(%rbp), %rax
orl -0x170(%rbp,%rax,4), %ecx
movl %ecx, -0x170(%rbp,%rax,4)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movzbl 0x1e(%rax,%rcx), %ecx
movslq -0x24(%rbp), %rax
orl -0x170(%rbp,%rax,4), %ecx
movl %ecx, -0x170(%rbp,%rax,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x23d9c
movl $0x10, -0x24(%rbp)
cmpl $0x50, -0x24(%rbp)
jge 0x23efb
movl -0x24(%rbp), %eax
subl $0x3, %eax
cltq
movl -0x170(%rbp,%rax,4), %ecx
movl -0x24(%rbp), %eax
subl $0x8, %eax
cltq
xorl -0x170(%rbp,%rax,4), %ecx
movl -0x24(%rbp), %eax
subl $0xe, %eax
cltq
xorl -0x170(%rbp,%rax,4), %ecx
movl -0x24(%rbp), %eax
subl $0x10, %eax
cltq
xorl -0x170(%rbp,%rax,4), %ecx
shll %ecx
movl -0x24(%rbp), %eax
subl $0x3, %eax
cltq
movl -0x170(%rbp,%rax,4), %eax
movl -0x24(%rbp), %edx
subl $0x8, %edx
movslq %edx, %rdx
xorl -0x170(%rbp,%rdx,4), %eax
movl -0x24(%rbp), %edx
subl $0xe, %edx
movslq %edx, %rdx
xorl -0x170(%rbp,%rdx,4), %eax
movl -0x24(%rbp), %edx
subl $0x10, %edx
movslq %edx, %rdx
xorl -0x170(%rbp,%rdx,4), %eax
shrl $0x1f, %eax
orl %eax, %ecx
movslq -0x24(%rbp), %rax
movl %ecx, -0x170(%rbp,%rax,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x23e56
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x174(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x178(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x17c(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x180(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x184(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x14, -0x24(%rbp)
jge 0x23feb
movl -0x174(%rbp), %eax
shll $0x5, %eax
movl -0x174(%rbp), %ecx
shrl $0x1b, %ecx
orl %ecx, %eax
movl -0x178(%rbp), %ecx
andl -0x17c(%rbp), %ecx
movl -0x178(%rbp), %edx
xorl $-0x1, %edx
andl -0x180(%rbp), %edx
orl %edx, %ecx
addl %ecx, %eax
addl -0x184(%rbp), %eax
movslq -0x24(%rbp), %rcx
addl -0x170(%rbp,%rcx,4), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x180(%rbp), %eax
movl %eax, -0x184(%rbp)
movl -0x17c(%rbp), %eax
movl %eax, -0x180(%rbp)
movl -0x178(%rbp), %eax
shll $0x1e, %eax
movl -0x178(%rbp), %ecx
shrl $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x17c(%rbp)
movl -0x174(%rbp), %eax
movl %eax, -0x178(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x174(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x23f42
movl $0x14, -0x24(%rbp)
cmpl $0x28, -0x24(%rbp)
jge 0x24090
movl -0x174(%rbp), %eax
shll $0x5, %eax
movl -0x174(%rbp), %ecx
shrl $0x1b, %ecx
orl %ecx, %eax
movl -0x178(%rbp), %ecx
xorl -0x17c(%rbp), %ecx
xorl -0x180(%rbp), %ecx
addl %ecx, %eax
addl -0x184(%rbp), %eax
movslq -0x24(%rbp), %rcx
addl -0x170(%rbp,%rcx,4), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x180(%rbp), %eax
movl %eax, -0x184(%rbp)
movl -0x17c(%rbp), %eax
movl %eax, -0x180(%rbp)
movl -0x178(%rbp), %eax
shll $0x1e, %eax
movl -0x178(%rbp), %ecx
shrl $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x17c(%rbp)
movl -0x174(%rbp), %eax
movl %eax, -0x178(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x174(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x23ff2
movl $0x28, -0x24(%rbp)
cmpl $0x3c, -0x24(%rbp)
jge 0x2414b
movl -0x174(%rbp), %eax
shll $0x5, %eax
movl -0x174(%rbp), %ecx
shrl $0x1b, %ecx
orl %ecx, %eax
movl -0x178(%rbp), %ecx
andl -0x17c(%rbp), %ecx
movl -0x178(%rbp), %edx
andl -0x180(%rbp), %edx
orl %edx, %ecx
movl -0x17c(%rbp), %edx
andl -0x180(%rbp), %edx
orl %edx, %ecx
addl %ecx, %eax
addl -0x184(%rbp), %eax
movslq -0x24(%rbp), %rcx
addl -0x170(%rbp,%rcx,4), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x180(%rbp), %eax
movl %eax, -0x184(%rbp)
movl -0x17c(%rbp), %eax
movl %eax, -0x180(%rbp)
movl -0x178(%rbp), %eax
shll $0x1e, %eax
movl -0x178(%rbp), %ecx
shrl $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x17c(%rbp)
movl -0x174(%rbp), %eax
movl %eax, -0x178(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x174(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x24097
movl $0x3c, -0x24(%rbp)
cmpl $0x50, -0x24(%rbp)
jge 0x241f0
movl -0x174(%rbp), %eax
shll $0x5, %eax
movl -0x174(%rbp), %ecx
shrl $0x1b, %ecx
orl %ecx, %eax
movl -0x178(%rbp), %ecx
xorl -0x17c(%rbp), %ecx
xorl -0x180(%rbp), %ecx
addl %ecx, %eax
addl -0x184(%rbp), %eax
movslq -0x24(%rbp), %rcx
addl -0x170(%rbp,%rcx,4), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x180(%rbp), %eax
movl %eax, -0x184(%rbp)
movl -0x17c(%rbp), %eax
movl %eax, -0x180(%rbp)
movl -0x178(%rbp), %eax
shll $0x1e, %eax
movl -0x178(%rbp), %ecx
shrl $0x2, %ecx
orl %ecx, %eax
movl %eax, -0x17c(%rbp)
movl -0x174(%rbp), %eax
movl %eax, -0x178(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x174(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x24152
movl -0x174(%rbp), %ecx
movq -0x8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x178(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x17c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x180(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl -0x184(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x1c(%rax)
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)