// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/libkeccak_cshake_initialise.c
// Function: libkeccak_cshake_initialise
void
libkeccak_cshake_initialise(struct libkeccak_state *restrict state,
                            const void *n_text, size_t n_len, size_t n_bits, const char *n_suffix,
                            const void *s_text, size_t s_len, size_t s_bits, const char *s_suffix)
{
	size_t off = 0, bitoff, byterate = (size_t)state->r >> 3;

	if (!n_suffix)
		n_suffix = "";
	if (!s_suffix)
		s_suffix = "";

	if (!n_len && !s_len && !n_bits && !s_bits && !*n_suffix && !*s_suffix)
		return;

	n_len += n_bits >> 3;
	s_len += s_bits >> 3;
	n_bits &= 7;
	s_bits &= 7;

	off = encode_left(state, state->M, byterate, byterate, off);
	off = encode_left(state, state->M, byterate, (n_len << 3) + n_bits + strlen(n_suffix), off);
	off = feed_text(state, state->M, n_text, n_len, n_bits, n_suffix, off, byterate, &bitoff);

	if (!bitoff) {
		off = encode_left(state, state->M, byterate, (s_len << 3) + s_bits + strlen(s_suffix), off);
		off = feed_text(state, state->M, s_text, s_len, s_bits, s_suffix, off, byterate, &bitoff);
	} else {
		off = encode_left_shifted(state, state->M, byterate, (s_len << 3) + s_bits + strlen(s_suffix), off, bitoff);
		off = feed_text_shifted(state, state->M, s_text, s_len, s_bits, s_suffix, off, byterate, &bitoff);
	}

	if (bitoff)
		off++;
	if (off) {
		memset(&state->M[off], 0, byterate - off);
		libkeccak_zerocopy_update(state, state->M, byterate);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0xc8(%rax), %rax
shrq $0x3, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xa57c
leaq 0x378d(%rip), %rax      # 0xdd05
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x20(%rbp)
jne 0xa58e
leaq 0x377b(%rip), %rax      # 0xdd05
movq %rax, 0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa5c1
cmpq $0x0, 0x10(%rbp)
jne 0xa5c1
cmpq $0x0, -0x20(%rbp)
jne 0xa5c1
cmpq $0x0, 0x18(%rbp)
jne 0xa5c1
movq -0x28(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xa5c1
movq 0x20(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xa5c1
jmp 0xa86d
movq -0x20(%rbp), %rax
shrq $0x3, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x18(%rbp), %rax
shrq $0x3, %rax
addq 0x10(%rbp), %rax
movq %rax, 0x10(%rbp)
movq -0x20(%rbp), %rax
andq $0x7, %rax
movq %rax, -0x20(%rbp)
movq 0x18(%rbp), %rax
andq $0x7, %rax
movq %rax, 0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x48(%rbp), %rdx
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0xa880
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
shlq $0x3, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1050
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rax, %rcx
movq -0x38(%rbp), %r8
callq 0xa880
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x38(%rbp), %r11
movq -0x48(%rbp), %r10
leaq -0x40(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xa9a0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xa767
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
movq 0x10(%rbp), %rax
shlq $0x3, %rax
addq 0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x20(%rbp), %rdi
callq 0x1050
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
addq %rax, %rcx
movq -0x38(%rbp), %r8
callq 0xa880
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x30(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movq 0x20(%rbp), %r9
movq -0x38(%rbp), %r11
movq -0x48(%rbp), %r10
leaq -0x40(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xa9a0
movq %rax, -0x38(%rbp)
jmp 0xa81d
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
movq 0x10(%rbp), %rax
shlq $0x3, %rax
addq 0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq 0x20(%rbp), %rdi
callq 0x1050
movq -0xa8(%rbp), %rcx
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
addq %rax, %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
callq 0xabc0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x30(%rbp), %rdx
movq 0x10(%rbp), %rcx
movq 0x18(%rbp), %r8
movq 0x20(%rbp), %r9
movq -0x38(%rbp), %r11
movq -0x48(%rbp), %r10
leaq -0x40(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xad50
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xa830
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xa86d
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rdi
addq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rdx
subq -0x38(%rbp), %rdx
xorl %esi, %esi
callq 0x1070
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x48(%rbp), %rdx
callq 0x54e0
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)