// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdx, %r15
leaq -0x1(%rsi), %rax
cqto
idivq %rcx
decq %rcx
cmpq $0x7, %rcx
ja 0x1263
movq %r8, %rbx
movq %rax, %r12
movq 0xd8(%rdi), %r8
leaq 0x3f45(%rip), %rax      # 0x5090
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %ebp, %ebp
leaq 0x3f73(%rip), %r13      # 0x50d0
pushq $0x8
popq %r14
movq %rdi, 0x8(%rsp)
testq %r8, %r8
jle 0x124d
xorl %eax, %eax
cmpq %r12, %rax
jg 0x11b1
cmpq %r15, %rbp
jge 0x11b1
movq (%r13,%rax,8), %rcx
movq (%rdi,%rcx,8), %rdx
leaq 0x8(%rbp), %rcx
movq %r14, %rsi
subq $0x1, %rsi
jb 0x11a4
cmpq %r15, %rbp
jge 0x11a9
movb %dl, (%rbx)
incq %rbx
shrq $0x8, %rdx
incq %rbp
jmp 0x118b
movq %rcx, %rbp
jmp 0x11ac
incq %rbp
incq %rax
jmp 0x1171
subq 0xc8(%rdi), %r8
jle 0x1166
movq 0x8(%rsp), %rdi
movq %r8, 0x10(%rsp)
callq 0x285b
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %rdi
jmp 0x1166
xorl %ebp, %ebp
leaq 0x3ef2(%rip), %r9       # 0x50d0
pushq $0x4
popq %r10
testq %r8, %r8
jle 0x124d
xorl %eax, %eax
cmpq %r12, %rax
jg 0x1226
cmpq %r15, %rbp
jge 0x1226
movq (%r9,%rax,8), %rcx
movl (%rdi,%rcx,4), %edx
leaq 0x4(%rbp), %rcx
movq %r10, %rsi
subq $0x1, %rsi
jb 0x1219
cmpq %r15, %rbp
jge 0x121e
movb %dl, (%rbx)
incq %rbx
shrl $0x8, %edx
incq %rbp
jmp 0x1201
movq %rcx, %rbp
jmp 0x1221
incq %rbp
incq %rax
jmp 0x11e9
subq 0xc8(%rdi), %r8
jle 0x11e2
movq %rdi, %r14
movq %r8, %r13
callq 0x285b
pushq $0x4
popq %r10
leaq 0x3e8b(%rip), %r9       # 0x50d0
movq %r13, %r8
movq %r14, %rdi
jmp 0x11e2
movq 0xd8(%rdi), %rcx
andq $0x7, %rcx
je 0x1263
movb $-0x1, %al
shlb %cl, %al
notb %al
andb %al, -0x1(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r8, %r13
movq %rdi, %r14
xorl %ebp, %ebp
testq %r13, %r13
jle 0x12e3
xorl %eax, %eax
movq %r14, %rdi
leaq 0x3e45(%rip), %r8       # 0x50d0
pushq $0x2
popq %r9
cmpq %r12, %rax
jg 0x12d0
cmpq %r15, %rbp
jge 0x12d0
movq (%r8,%rax,8), %rcx
movzwl (%rdi,%rcx,2), %edx
leaq 0x2(%rbp), %rcx
movq %r9, %rsi
subq $0x1, %rsi
jb 0x12c3
cmpq %r15, %rbp
jge 0x12c8
movzwl %dx, %edx
movb %dl, (%rbx)
incq %rbx
shrl $0x8, %edx
incq %rbp
jmp 0x12a8
movq %rcx, %rbp
jmp 0x12cb
incq %rbp
incq %rax
jmp 0x128f
subq 0xc8(%rdi), %r13
jle 0x127a
movq %r14, %rdi
callq 0x285b
jmp 0x127a
movq 0xd8(%r14), %rcx
jmp 0x1254
movq %r8, %r14
movq %rdi, %rbp
xorl %eax, %eax
testq %r14, %r14
jle 0x1344
leaq 0x3dcd(%rip), %rdx      # 0x50d0
xorl %ecx, %ecx
leaq (%rax,%rcx), %r13
cmpq %r12, %rcx
jg 0x1328
cmpq %r15, %r13
jge 0x1328
movq (%rdx), %rsi
movb (%rbp,%rsi), %sil
movb %sil, (%rbx,%rcx)
incq %rcx
addq $0x8, %rdx
jmp 0x1305
addq %rcx, %rbx
movq %r13, %rax
subq 0xc8(%rbp), %r14
jle 0x12f7
movq %rbp, %rdi
callq 0x285b
movq %r13, %rax
jmp 0x12f7
movq 0xd8(%rbp), %rcx
jmp 0x1254