// File: /workspace/github_c_makefile_star2_O1/maandree[P]libkeccak/test.c
// Function: test_digest_trunc
static int
test_digest_trunc(void)
{
#define shake(semicapacity, output, output_lastbyte)\
	(printf("  Testing SHAKE-"#semicapacity"('', %i): ", output),\
	 libkeccak_spec_shake(&spec, semicapacity, output),\
	 test_digest_case(&spec, LIBKECCAK_SHAKE_SUFFIX, "", 0, 0, INCOMPLETE_ANSWER output_lastbyte))
#define INCOMPLETE_ANSWER\
	"7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef263cb1eea988004b93103cfb0aeefd2a68"\
	"6e01fa4a58e8a3639ca8a1e3f9ae57e235b8cc873c23dc62b8d260169afa2f75ab916a58d974918835d25e6a435085b2"\
	"badfd6dfaac359a5efbb7bcc4b59d538df9a04302e10c8bc1cbf1a0b3a5120ea17cda7cfad765f5623474d368ccca8af"\
	"0007cd9f5e4c849f167a580b14aabdefaee7eef47cb0fca9767be1fda69419dfb927e9df07348b196691abaeb580b32d"\
	"ef58538b8d23f87732ea63b02b4fa0f4873360e2841928cd60dd4cee8cc0d4c922a96188d032675c8ac850933c7aff15"\
	"33b94c834adbb69c6115bad4692d8619f90b0cdf8a7b9c264029ac185b70b83f2801f2f4b3f70c593ea3aeeb613a7f1b"\
	"1de33fd75081f592305f2e4526edc09631b10958f464d889f31ba010250fda7f1368ec2967fc84ef2ae9aff268e0b170"\
	"0affc6820b523a3d917135f2dff2ee06bfe72b3124721d4a26c04e53a75e30e73a7a9c4a95d91c55d495e9f51dd0b5e9"\
	"d83c6d5e8ce803aa62b8d654db53d09b8dcff273cdfeb573fad8bcd45578bec2e770d01efde86e721a3f7c6cce275dab"\
	"e6e2143f1af18da7efddc4c7b70b5e345db93cc936bea323491ccb38a388f546a9ff00dd4e1300b9b2153d2041d205b4"\
	"43e41b45a653f2a5c4492c1add544512dda2529833462b71a41a45be97290b"


	struct libkeccak_spec spec;

	printf("Testing libkeccak_digest with byte-incomplete output:\n");


	if (shake(128, 4096, "6f"))
		return -1;

	if (shake(128, 4095, "6f"))
		return -1;

	if (shake(128, 4094, "2f"))
		return -1;

	if (shake(128, 4093, "0f"))
		return -1;

	if (shake(128, 4092, "0f"))
		return -1;

	if (shake(128, 4091, "07"))
		return -1;

	if (shake(128, 4090, "03"))
		return -1;

	if (shake(128, 4089, "01"))
		return -1;

	if (shake(128, 4088, ""))
		return -1;


	printf("\n");
	return 0;

#undef shake
#undef INCOMPLETE_ANSWER
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0xd6d1(%rip), %rdi      # 0x1107e
callq 0x1060
leaq 0xb96e(%rip), %rdi      # 0xf327
movl $0x1000, %esi           # imm = 0x1000
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0x1000, 0x10(%rdi)     # imm = 0x1000
leaq 0x725c(%rip), %rsi      # 0xac44
leaq 0x711d(%rip), %rdx      # 0xab0c
leaq 0x7d13(%rip), %r9       # 0xb709
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3cc1
leaq 0xb913(%rip), %rdi      # 0xf327
movl $0xfff, %esi            # imm = 0xFFF
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xfff, 0x10(%rdi)      # imm = 0xFFF
leaq 0x7201(%rip), %rsi      # 0xac44
leaq 0x70c2(%rip), %rdx      # 0xab0c
leaq 0x7cb8(%rip), %r9       # 0xb709
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
leaq 0xb8bd(%rip), %rdi      # 0xf327
movl $0xffe, %esi            # imm = 0xFFE
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xffe, 0x10(%rdi)      # imm = 0xFFE
leaq 0x71ab(%rip), %rsi      # 0xac44
leaq 0x706c(%rip), %rdx      # 0xab0c
leaq 0xb89e(%rip), %r9       # 0xf345
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
leaq 0xb867(%rip), %rdi      # 0xf327
movl $0xffd, %esi            # imm = 0xFFD
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xffd, 0x10(%rdi)      # imm = 0xFFD
leaq 0x7155(%rip), %rsi      # 0xac44
leaq 0x7016(%rip), %rdx      # 0xab0c
leaq 0xbc49(%rip), %r9       # 0xf746
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
leaq 0xb811(%rip), %rdi      # 0xf327
movl $0xffc, %esi            # imm = 0xFFC
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xffc, 0x10(%rdi)      # imm = 0xFFC
leaq 0x70ff(%rip), %rsi      # 0xac44
leaq 0x6fc0(%rip), %rdx      # 0xab0c
leaq 0xbbf3(%rip), %r9       # 0xf746
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
leaq 0xb7bb(%rip), %rdi      # 0xf327
movl $0xffb, %esi            # imm = 0xFFB
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xffb, 0x10(%rdi)      # imm = 0xFFB
leaq 0x70a9(%rip), %rsi      # 0xac44
leaq 0x6f6a(%rip), %rdx      # 0xab0c
leaq 0xbf9e(%rip), %r9       # 0xfb47
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
leaq 0xb765(%rip), %rdi      # 0xf327
movl $0xffa, %esi            # imm = 0xFFA
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xffa, 0x10(%rdi)      # imm = 0xFFA
leaq 0x7053(%rip), %rsi      # 0xac44
leaq 0x6f14(%rip), %rdx      # 0xab0c
leaq 0xc349(%rip), %r9       # 0xff48
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
leaq 0xb70f(%rip), %rdi      # 0xf327
movl $0xff9, %esi            # imm = 0xFF9
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xff9, 0x10(%rdi)      # imm = 0xFF9
leaq 0x6ffd(%rip), %rsi      # 0xac44
leaq 0x6ebe(%rip), %rdx      # 0xab0c
leaq 0xc6f4(%rip), %r9       # 0x10349
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
leaq 0xb6bd(%rip), %rdi      # 0xf327
movl $0xff8, %esi            # imm = 0xFF8
xorl %eax, %eax
callq 0x1080
leaq 0x8(%rsp), %rdi
movq $0x540, (%rdi)          # imm = 0x540
movq $0x100, 0x8(%rdi)       # imm = 0x100
movq $0xff8, 0x10(%rdi)      # imm = 0xFF8
leaq 0x6fab(%rip), %rsi      # 0xac44
leaq 0x6e6c(%rip), %rdx      # 0xab0c
leaq 0xcaa3(%rip), %r9       # 0x1074a
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4688
testl %eax, %eax
jne 0x3cc1
movl $0xa, %edi
callq 0x1040
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq