// File: /workspace/github_c_makefile_star2_O3/aerospike[P]aerospike-common/src/main/citrusleaf/cf_crypto.c
// Function: cf_SHA1
void
cf_SHA1(const uint8_t* d, size_t n, uint8_t* md)
{
	cf_SHA1Context sha;

	cf_SHA1Reset(&sha);
	cf_SHA1Input(&sha, d, (unsigned)n);
	cf_SHA1Result(&sha, md);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movdqa 0x5656(%rip), %xmm0     # 0x198a0
movq %rdx, %rbx
movl $0xc3d2e1f0, %eax       # imm = 0xC3D2E1F0
movl $0x0, 0x18(%rsp)
movw $0x0, 0x1c(%rsp)
testl %r14d, %r14d
sete %cl
testq %rdi, %rdi
sete %dl
movdqa %xmm0, (%rsp)
movq %rax, 0x10(%rsp)
movb $0x1, %al
orb %cl, %dl
movq $0x0, 0x60(%rsp)
jne 0x142e4
movq %rdi, %r15
movq %rsp, %r12
cmpl $0x0, 0x64(%rsp)
jne 0x1449e
movswq 0x1c(%rsp), %rcx
movb (%r15), %al
leal 0x1(%rcx), %edx
movw %dx, 0x1c(%rsp)
movb %al, 0x1e(%rsp,%rcx)
addl $0x8, 0x14(%rsp)
jne 0x142c1
incl 0x18(%rsp)
jne 0x142c1
movl $0x1, 0x64(%rsp)
cmpw $0x40, 0x1c(%rsp)
jne 0x142d1
movq %r12, %rdi
callq 0x15c79
decl %r14d
incq %r15
testl %r14d, %r14d
jne 0x1428c
cmpl $0x0, 0x64(%rsp)
sete %al
testq %rbx, %rbx
je 0x1449e
testb %al, %al
je 0x1449e
cmpl $0x0, 0x60(%rsp)
jne 0x143eb
leaq 0x1e(%rsp), %r15
movswq -0x2(%r15), %rcx
leal 0x1(%rcx), %eax
cmpq $0x38, %rcx
movw %ax, -0x2(%r15)
jl 0x14373
cmpw $0x3f, %ax
movb $-0x80, 0x1e(%rsp,%rcx)
jg 0x1433f
leal 0x1(%rax), %ecx
movswq %ax, %rax
movw %cx, 0x1c(%rsp)
movb $0x0, 0x1e(%rsp,%rax)
movzwl 0x1c(%rsp), %eax
cmpw $0x40, %ax
jl 0x14323
movq %rsp, %r14
movq %r14, %rdi
callq 0x15c79
movzwl 0x1c(%r14), %eax
cmpw $0x37, %ax
jg 0x1439f
leal 0x1(%rax), %ecx
movswq %ax, %rax
movw %cx, 0x1c(%rsp)
movb $0x0, 0x1e(%rsp,%rax)
movzwl 0x1c(%rsp), %eax
cmpw $0x38, %ax
jl 0x14355
jmp 0x1439f
movb $-0x80, 0x1e(%rsp,%rcx)
movzwl 0x1c(%rsp), %eax
cmpw $0x37, %ax
jg 0x1439f
leal 0x1(%rax), %ecx
movswq %ax, %rax
movw %cx, 0x1c(%rsp)
movb $0x0, 0x1e(%rsp,%rax)
movzwl 0x1c(%rsp), %eax
cmpw $0x38, %ax
jl 0x14383
movq %rsp, %r14
movl 0x14(%r14), %eax
movl 0x18(%r14), %ecx
movq %r14, %rdi
bswapl %ecx
bswapl %eax
movl %ecx, 0x56(%r14)
movl %eax, 0x5a(%r14)
callq 0x15c79
xorl %eax, %eax
movq %rax, 0x38(%r15)
movq %rax, 0x30(%r15)
movq %rax, 0x28(%r15)
movq %rax, 0x20(%r15)
movq %rax, 0x18(%r15)
movq %rax, 0x10(%r15)
movq %rax, 0x8(%r15)
movq %rax, (%r15)
movq %rax, 0x14(%r14)
movl $0x1, 0x60(%r14)
movdqa 0x54bd(%rip), %xmm0     # 0x198b0
movdqa 0x54c5(%rip), %xmm2     # 0x198c0
movaps 0x54ce(%rip), %xmm3     # 0x198d0
movdqa 0x54d6(%rip), %xmm4     # 0x198e0
movq $-0x14, %rax
pcmpeqd %xmm1, %xmm1
movd 0x14(%rsp,%rax), %xmm5
movdqa %xmm0, %xmm6
pxor %xmm1, %xmm6
pslld $0x3, %xmm6
pand %xmm2, %xmm6
pshufd $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
pshuflw $0xfe, %xmm6, %xmm7     # xmm7 = xmm6[2,3,3,3,4,5,6,7]
movdqa %xmm5, %xmm8
movdqa %xmm5, %xmm9
movdqa %xmm5, %xmm10
psrld %xmm7, %xmm8
pshuflw $0x54, %xmm6, %xmm7     # xmm7 = xmm6[0,1,1,1,4,5,6,7]
pshufd $0xee, %xmm6, %xmm6     # xmm6 = xmm6[2,3,2,3]
psrld %xmm7, %xmm9
pshuflw $0xfe, %xmm6, %xmm7     # xmm7 = xmm6[2,3,3,3,4,5,6,7]
pshuflw $0x54, %xmm6, %xmm6     # xmm6 = xmm6[0,1,1,1,4,5,6,7]
psrld %xmm7, %xmm10
psrld %xmm6, %xmm5
punpcklqdq %xmm8, %xmm9    # xmm9 = xmm9[0],xmm8[0]
punpckhqdq %xmm10, %xmm5   # xmm5 = xmm5[1],xmm10[1]
shufps $0xcc, %xmm5, %xmm9     # xmm9 = xmm9[0,3],xmm5[0,3]
andps %xmm3, %xmm9
packuswb %xmm9, %xmm9
packuswb %xmm9, %xmm9
paddd %xmm4, %xmm0
movd %xmm9, 0x14(%rbx,%rax)
addq $0x4, %rax
jne 0x14415
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq