// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq $0x480, (%rsp)          # imm = 0x480
movq $0x1c0, 0x8(%rsp)       # imm = 0x1C0
movq $0xe0, 0x10(%rsp)
movl $0x1c, %edi
callq 0x10e0
testq %rax, %rax
je 0x44c5
movq %rax, %rbx
movl $0x39, %edi
callq 0x10e0
testq %rax, %rax
je 0x44c5
movq %rax, %r14
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x88f0
testl %eax, %eax
jne 0x44ce
leaq 0xd078(%rip), %rdi      # 0x110ce
callq 0x1060
leaq 0xcaf8(%rip), %rdi      # 0x10b5a
xorl %eax, %eax
callq 0x1080
leaq 0xcb1a(%rip), %rax      # 0x10b8a
leaq 0x18(%rsp), %r12
movq %rsp, %r13
movl $0x1, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movq %rbx, %r9
pushq %rax
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcb25(%rip), %rdi      # 0x10bc3
xorl %eax, %eax
callq 0x1080
leaq 0xcb47(%rip), %rax      # 0x10bf3
movl $0x2, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movq %rbx, %r9
pushq %rax
movq %rax, %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcb57(%rip), %rdi      # 0x10c2c
xorl %eax, %eax
callq 0x1080
movl $0x1, %edx
movl $0x2, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %r8d, %r8d
movq %rbx, %r9
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcb56(%rip), %rdi      # 0x10c5c
xorl %eax, %eax
callq 0x1080
leaq 0xcb78(%rip), %rax      # 0x10c8c
movl $0x3, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movq %rbx, %r9
pushq %rax
movq %rax, %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcb88(%rip), %rdi      # 0x10cc5
xorl %eax, %eax
callq 0x1080
movl $0x1, %edx
movl $0x3, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %r8d, %r8d
movq %rbx, %r9
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcb87(%rip), %rdi      # 0x10cf5
xorl %eax, %eax
callq 0x1080
movl $0x2, %edx
movl $0x3, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %r8d, %r8d
movq %rbx, %r9
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcb86(%rip), %rdi      # 0x10d25
xorl %eax, %eax
callq 0x1080
leaq 0xcba8(%rip), %rbp      # 0x10d55
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcbbb(%rip), %rdi      # 0x10d8e
xorl %eax, %eax
callq 0x1080
movl $0x1, %edx
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %r8d, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcbbb(%rip), %rdi      # 0x10dbe
xorl %eax, %eax
callq 0x1080
movl $0x2, %edx
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %r8d, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xcbbb(%rip), %rdi      # 0x10dee
xorl %eax, %eax
callq 0x1080
movl $0x3, %edx
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %r8d, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
movl $0xa, %edi
callq 0x1040
leaq 0xce95(%rip), %rdi      # 0x11102
callq 0x1060
leaq 0xc8e1(%rip), %rdi      # 0x10b5a
xorl %eax, %eax
callq 0x1080
movl $0x1, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x1, %r8d
movq %rbx, %r9
leaq 0xc8ed(%rip), %rax      # 0x10b8a
pushq %rax
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc913(%rip), %rdi      # 0x10bc3
xorl %eax, %eax
callq 0x1080
movl $0x2, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x1, %r8d
movq %rbx, %r9
leaq 0xc91f(%rip), %r15      # 0x10bf3
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc944(%rip), %rdi      # 0x10c2c
xorl %eax, %eax
callq 0x1080
movl $0x1, %edx
movl $0x2, %ecx
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %r8d
movq %rbx, %r9
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc940(%rip), %rdi      # 0x10c5c
xorl %eax, %eax
callq 0x1080
movl $0x3, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x1, %r8d
movq %rbx, %r9
leaq 0xc94c(%rip), %r15      # 0x10c8c
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc971(%rip), %rdi      # 0x10cc5
xorl %eax, %eax
callq 0x1080
movl $0x1, %edx
movl $0x3, %ecx
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %r8d
movq %rbx, %r9
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc96d(%rip), %rdi      # 0x10cf5
xorl %eax, %eax
callq 0x1080
movl $0x2, %edx
movl $0x3, %ecx
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %r8d
movq %rbx, %r9
pushq %r15
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc969(%rip), %rdi      # 0x10d25
xorl %eax, %eax
callq 0x1080
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
movl $0x1, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc9a2(%rip), %rdi      # 0x10d8e
xorl %eax, %eax
callq 0x1080
movl $0x1, %edx
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc99f(%rip), %rdi      # 0x10dbe
xorl %eax, %eax
callq 0x1080
movl $0x2, %edx
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
leaq 0xc99c(%rip), %rdi      # 0x10dee
xorl %eax, %eax
callq 0x1080
movl $0x3, %edx
movl $0x4, %ecx
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %r8d
movq %rbx, %r9
pushq %rbp
pushq %r14
callq 0x4acc
addq $0x10, %rsp
movl $0xa, %edi
callq 0x1040
movq 0x118(%r12), %rdi
callq 0x1030
movq $0x0, 0x118(%r12)
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5ce5(%rip), %rdi      # 0xa1b1
jmp 0x44d5
leaq 0x5ca7(%rip), %rdi      # 0xa17c
callq 0x1120
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x44b3