// File: /workspace/github_c_makefile_star2_O3/maandree[P]libkeccak/digest.c
// Function: libkeccak_squeezing_phase
LIBKECCAK_GCC_ONLY(__attribute__((__nonnull__, __nothrow__, __hot__)))
static void
libkeccak_squeezing_phase(register struct libkeccak_state *restrict state, long int rr,
                          long int nn, long int ww, register unsigned char *restrict hashsum)
{
	register long int ni = (rr - 1) / ww + 1;
	auto long int olen = state->n;
	auto long int i, j = 0;
	register long int k;
	if (__builtin_expect(ww == 8, 1)) {
		register uint64_t v;
		while (olen > 0) {
			for (i = 0; i < ni && j < nn; i++) {
				v = state->S.w64[LANE_TRANSPOSE_MAP[i]];
				for (k = 0; k++ < ww && j++ < nn; v >>= 8)
					*hashsum++ = (unsigned char)v;
			}
			olen -= state->r;
			if (olen > 0)
				libkeccak_f(state);
		}
		if (state->n & 7)
			hashsum[-1] &= (unsigned char)((1 << (state->n & 7)) - 1);
	} else if (__builtin_expect(ww == 4, 1)) {
		register uint32_t v;
		while (olen > 0) {
			for (i = 0; i < ni && j < nn; i++) {
				v = state->S.w32[LANE_TRANSPOSE_MAP[i]];
				for (k = 0; k++ < ww && j++ < nn; v >>= 8)
					*hashsum++ = (unsigned char)v;
			}
			olen -= state->r;
			if (olen > 0)
				libkeccak_f(state);
		}
		if (state->n & 7)
			hashsum[-1] &= (unsigned char)((1 << (state->n & 7)) - 1);
	} else if (__builtin_expect(ww == 2, 1)) {
		register uint16_t v;
		while (olen > 0) {
			for (i = 0; i < ni && j < nn; i++) {
				v = state->S.w16[LANE_TRANSPOSE_MAP[i]];
				for (k = 0; k++ < ww && j++ < nn; v >>= 8)
					*hashsum++ = (unsigned char)v;
			}
			olen -= state->r;
			if (olen > 0)
				libkeccak_f(state);
		}
		if (state->n & 7)
			hashsum[-1] &= (unsigned char)((1 << (state->n & 7)) - 1);
	} else if (__builtin_expect(ww == 1, 1)) {
		register uint8_t v;
		while (olen > 0) {
			for (i = 0; i < ni && j < nn; i++, j++) {
				v = state->S.w8[LANE_TRANSPOSE_MAP[i]];
				*hashsum++ = (unsigned char)v;
			}
			olen -= state->r;
			if (olen > 0)
				libkeccak_f(state);
		}
		if (state->n & 7)
			hashsum[-1] &= (unsigned char)((1 << (state->n & 7)) - 1);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdx, %r12
movq %rdi, %r15
leaq -0x1(%rsi), %rax
cqto
idivq %rcx
movq 0xd8(%rdi), %r13
cmpq $0x8, %rcx
movq %rax, (%rsp)
jne 0x11b9
testq %r13, %r13
jle 0x123e
xorl %r14d, %r14d
leaq 0x4f3f(%rip), %rbp      # 0x6090
testq %rax, %rax
js 0x119e
cmpq %r12, %r14
jge 0x119e
xorl %r8d, %r8d
movq %r14, %rcx
movq (%rbp,%r8,8), %rdx
movq (%r15,%rdx,8), %rdx
addq $0x8, %r14
movl $0x8, %esi
cmpq %r12, %rcx
jge 0x118b
movb %dl, (%rbx)
incq %rbx
shrq $0x8, %rdx
incq %rcx
decq %rsi
jne 0x1173
jmp 0x1191
incq %rcx
movq %rcx, %r14
cmpq %rax, %r8
jge 0x119e
incq %r8
cmpq %r12, %r14
jl 0x115e
subq 0xc8(%r15), %r13
jle 0x1237
movq %r15, %rdi
callq 0x3a32
movq (%rsp), %rax
jmp 0x1151
cmpq $0x4, %rcx
jne 0x125f
testq %r13, %r13
jle 0x123e
movq %r13, %r14
xorl %ebp, %ebp
leaq 0x4ebc(%rip), %r13      # 0x6090
testq %rax, %rax
js 0x1220
cmpq %r12, %rbp
jge 0x1220
xorl %r8d, %r8d
movq %rbp, %rcx
movq (%r13,%r8,8), %rdx
movl (%r15,%rdx,4), %edx
addq $0x4, %rbp
movl $0x4, %esi
cmpq %r12, %rcx
jge 0x120d
movb %dl, (%rbx)
incq %rbx
shrl $0x8, %edx
incq %rcx
decq %rsi
jne 0x11f6
jmp 0x1213
incq %rcx
movq %rcx, %rbp
cmpq %rax, %r8
jge 0x1220
incq %r8
cmpq %r12, %rbp
jl 0x11e1
subq 0xc8(%r15), %r14
jle 0x1237
movq %r15, %rdi
callq 0x3a32
movq (%rsp), %rax
jmp 0x11d4
movq 0xd8(%r15), %r13
andq $0x7, %r13
je 0x1250
movb $-0x1, %al
movl %r13d, %ecx
shlb %cl, %al
notb %al
andb %al, -0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %r14
cmpq $0x2, %rcx
jne 0x12df
testq %r14, %r14
jle 0x134c
xorl %ebp, %ebp
leaq 0x4e16(%rip), %r13      # 0x6090
cmpq $0x0, (%rsp)
js 0x12cc
cmpq %r12, %rbp
jge 0x12cc
xorl %eax, %eax
movq %rbp, %rcx
movq (%r13,%rax,8), %rdx
movzwl (%r15,%rdx,2), %edx
addq $0x2, %rbp
movl $0x2, %esi
cmpq %r12, %rcx
jge 0x12b8
movzwl %dx, %edx
movb %dl, (%rbx)
incq %rbx
shrl $0x8, %edx
incq %rcx
decq %rsi
jne 0x129e
jmp 0x12be
incq %rcx
movq %rcx, %rbp
cmpq (%rsp), %rax
jge 0x12cc
incq %rax
cmpq %r12, %rbp
jl 0x1288
subq 0xc8(%r15), %r14
jle 0x1345
movq %r15, %rdi
callq 0x3a32
jmp 0x127a
cmpq $0x1, %rcx
jne 0x1250
testq %r14, %r14
jle 0x134c
xorl %ebp, %ebp
leaq 0x4d99(%rip), %r13      # 0x6090
cmpq $0x0, (%rsp)
setns %al
cmpq %r12, %rbp
setl %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1332
movq %r13, %rax
xorl %ecx, %ecx
movq (%rax), %rdx
movb (%r15,%rdx), %dl
movb %dl, (%rbx)
incq %rbx
incq %rbp
cmpq (%rsp), %rcx
jge 0x1332
incq %rcx
addq $0x8, %rax
cmpq %r12, %rbp
jl 0x1311
subq 0xc8(%r15), %r14
jle 0x1345
movq %r15, %rdi
callq 0x3a32
jmp 0x12f7
movq 0xd8(%r15), %r14
movq %r14, %r13
jmp 0x123e