// File: /workspace/github_c_makefile_star2_O0/maandree[P]libkeccak/test.c
// Function: test_squeeze
static int
test_squeeze(void)
{
#define answer1 "03fe12b4b51d56d96377d927e5cd498fc4bc3aee389b2f2ff8393aa5"
#define answer2 "0b8fb64ee5d8836956f49cbe4577afbc638c855c1d553452fc1eceb8"
#define answer3 "1e03b4cd9eef3892a7b5e865fce393c4bc90120d9aea84d0a0dff3b8"
#define answer4 "aac92fbfd22ce62e83ddaf2e61bd7bf696326e46d1327defa4530e20"

#define run_test(fast_squeezes, squeezes, fast_digest)\
	test_squeeze_case(&state, &spec, fast_squeezes, squeezes, fast_digest, hashsum, hexsum, answer##squeezes)

	struct libkeccak_spec spec;
	struct libkeccak_state state;
	unsigned char *restrict hashsum;
	char *restrict hexsum;

	libkeccak_spec_sha3(&spec, 224);
	hashsum = malloc((size_t)((spec.output + 7) / 8));
	if (!hashsum) {
		perror("malloc");
		return -1;
	}
	hexsum = malloc((size_t)((spec.output + 7) / 8 * 2 + 1));
	if (!hexsum) {
		perror("malloc");
		return -1;
	}
	if (libkeccak_state_initialise(&state, &spec)) {
		perror("libkeccak_state_initialise");
		return -1;
	}

# if defined(__clang__)
#  pragma clang diagnostic push
#  pragma clang diagnostic ignored "-Wcomma"
# endif

	printf("Testing squeeze functions with slow initial digest:\n");
	printf("  1 extra squeeze,  including 0 fast squeezes: "), run_test(0, 1, 0);
	printf("  2 extra squeezes, including 0 fast squeezes: "), run_test(0, 2, 0);
	printf("  2 extra squeezes, including 1 fast squeeze:  "), run_test(1, 2, 0);
	printf("  3 extra squeezes, including 0 fast squeezes: "), run_test(0, 3, 0);
	printf("  3 extra squeezes, including 1 fast squeeze:  "), run_test(1, 3, 0);
	printf("  3 extra squeezes, including 2 fast squeezes: "), run_test(2, 3, 0);
	printf("  4 extra squeezes, including 0 fast squeezes: "), run_test(0, 4, 0);
	printf("  4 extra squeezes, including 1 fast squeeze:  "), run_test(1, 4, 0);
	printf("  4 extra squeezes, including 2 fast squeezes: "), run_test(2, 4, 0);
	printf("  4 extra squeezes, including 3 fast squeezes: "), run_test(3, 4, 0);
	printf("\n");

	printf("Testing squeeze functions with fast initial digest:\n");
	printf("  1 extra squeeze,  including 0 fast squeezes: "), run_test(0, 1, 1);
	printf("  2 extra squeezes, including 0 fast squeezes: "), run_test(0, 2, 1);
	printf("  2 extra squeezes, including 1 fast squeeze:  "), run_test(1, 2, 1);
	printf("  3 extra squeezes, including 0 fast squeezes: "), run_test(0, 3, 1);
	printf("  3 extra squeezes, including 1 fast squeeze:  "), run_test(1, 3, 1);
	printf("  3 extra squeezes, including 2 fast squeezes: "), run_test(2, 3, 1);
	printf("  4 extra squeezes, including 0 fast squeezes: "), run_test(0, 4, 1);
	printf("  4 extra squeezes, including 1 fast squeeze:  "), run_test(1, 4, 1);
	printf("  4 extra squeezes, including 2 fast squeezes: "), run_test(2, 4, 1);
	printf("  4 extra squeezes, including 3 fast squeezes: "), run_test(3, 4, 1);
	printf("\n");

# if defined(__clang__)
#  pragma clang diagnostic pop
# endif

	libkeccak_state_fast_destroy(&state);
	free(hashsum);
	free(hexsum);
	return 0;

#undef run_test
#undef answer4
#undef answer3
#undef answer2
#undef answer1
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
leaq -0x20(%rbp), %rdi
movl $0xe0, %esi
callq 0xbdf0
movq -0x10(%rbp), %rax
addq $0x7, %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, %rdi
callq 0x10c0
movq %rax, -0x148(%rbp)
cmpq $0x0, -0x148(%rbp)
jne 0x442c
leaq 0x8e7e(%rip), %rdi      # 0xd299
callq 0x1100
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ad0
movq -0x10(%rbp), %rax
addq $0x7, %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, %rdi
shlq %rdi
addq $0x1, %rdi
callq 0x10c0
movq %rax, -0x150(%rbp)
cmpq $0x0, -0x150(%rbp)
jne 0x4476
leaq 0x8e34(%rip), %rdi      # 0xd299
callq 0x1100
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ad0
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xafd0
cmpl $0x0, %eax
je 0x44a3
leaq 0x8d91(%rip), %rdi      # 0xd223
callq 0x1100
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4ad0
leaq 0xf92b(%rip), %rdi      # 0x13dd5
movb $0x0, %al
callq 0x1060
leaq 0xf952(%rip), %rdi      # 0x13e0a
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
leaq 0xf94f(%rip), %rax      # 0x13e3a
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf973(%rip), %rdi      # 0x13e73
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
leaq 0xf970(%rip), %rax      # 0x13ea3
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf994(%rip), %rdi      # 0x13edc
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x1, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
leaq 0xf927(%rip), %rax      # 0x13ea3
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf97b(%rip), %rdi      # 0x13f0c
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
leaq 0xf978(%rip), %rax      # 0x13f3c
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf99c(%rip), %rdi      # 0x13f75
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x1, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
leaq 0xf92f(%rip), %rax      # 0x13f3c
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf983(%rip), %rdi      # 0x13fa5
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x2, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
leaq 0xf8e6(%rip), %rax      # 0x13f3c
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf96a(%rip), %rdi      # 0x13fd5
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0xf967(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf98b(%rip), %rdi      # 0x1403e
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x1, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0xf91e(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf972(%rip), %rdi      # 0x1406e
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x2, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0xf8d5(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf959(%rip), %rdi      # 0x1409e
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
leaq 0xf88c(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0x88b7(%rip), %rdi      # 0xd045
movb $0x0, %al
callq 0x1060
leaq 0xf932(%rip), %rdi      # 0x140ce
movb $0x0, %al
callq 0x1060
leaq 0xf660(%rip), %rdi      # 0x13e0a
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
movl $0x1, %r8d
leaq 0xf65a(%rip), %rax      # 0x13e3a
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf67e(%rip), %rdi      # 0x13e73
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x2, %ecx
movl $0x1, %r8d
leaq 0xf678(%rip), %rax      # 0x13ea3
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf69c(%rip), %rdi      # 0x13edc
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x1, %edx
movl $0x2, %ecx
movl $0x1, %r8d
leaq 0xf62c(%rip), %rax      # 0x13ea3
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf680(%rip), %rdi      # 0x13f0c
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x3, %ecx
movl $0x1, %r8d
leaq 0xf67a(%rip), %rax      # 0x13f3c
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf69e(%rip), %rdi      # 0x13f75
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x1, %edx
movl $0x3, %ecx
movl $0x1, %r8d
leaq 0xf62e(%rip), %rax      # 0x13f3c
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf682(%rip), %rdi      # 0x13fa5
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x1, %r8d
leaq 0xf5e2(%rip), %rax      # 0x13f3c
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf666(%rip), %rdi      # 0x13fd5
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x4, %ecx
movl $0x1, %r8d
leaq 0xf660(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf684(%rip), %rdi      # 0x1403e
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x1, %edx
movl $0x4, %ecx
movl $0x1, %r8d
leaq 0xf614(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf668(%rip), %rdi      # 0x1406e
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x2, %edx
movl $0x4, %ecx
movl $0x1, %r8d
leaq 0xf5c8(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0xf64c(%rip), %rdi      # 0x1409e
movb $0x0, %al
callq 0x1060
movq -0x148(%rbp), %r9
movq -0x150(%rbp), %r10
leaq -0x140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x3, %edx
movl $0x4, %ecx
movl $0x1, %r8d
leaq 0xf57c(%rip), %rax      # 0x14005
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x5340
leaq 0x85a7(%rip), %rdi      # 0xd045
movb $0x0, %al
callq 0x1060
leaq -0x140(%rbp), %rdi
callq 0xaf90
movq -0x148(%rbp), %rdi
callq 0x1030
movq -0x150(%rbp), %rdi
callq 0x1030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopl (%rax)