// File: /workspace/github_c_makefile_star2_O1/maandree[P]libkeccak/test.c
// Function: main
int
main(void)
{
	struct libkeccak_generalised_spec gspec;
	struct libkeccak_spec spec;

	libkeccak_generalised_spec_initialise(&gspec);
	if (libkeccak_degeneralise_spec(&gspec, &spec)) {
		printf("libkeccak_degeneralise_spec failed with all members at automatic.\n");
		return 1;
	}

	printf("Resolution of default specification:\n");
	printf("  bitrate:    %li\n", gspec.bitrate);
	printf("  capacity:   %li\n", gspec.capacity);
	printf("  output:     %li\n", gspec.output);
	printf("  state size: %li\n", gspec.state_size);
	printf("  word size:  %li\n", gspec.word_size);

	if (gspec.word_size * 25 != gspec.state_size ||
	    gspec.bitrate + gspec.capacity != gspec.state_size) {
		printf("Invalid information\n");
		return 1;
	}
	if (gspec.state_size != 1600 ||
	    gspec.bitrate != gspec.output * 2 ||
	    gspec.output != 512) {
		printf("Incorrect information\n");
		return 1;
	}
	printf("\n");

	if (test_hex() ||
	    test_state(&spec) ||
	    test_digest() ||
	    test_digest_bits() ||
	    test_digest_trunc() ||
	    test_update() ||
	    test_squeeze())
		return 1;

	if (test_file(&spec, LIBKECCAK_SHA3_SUFFIX, ".testfile",
	              "a95484492e9ade0f1d28f872d197ff45d891e85e78f918643f41d524c5d6ab0f"
	              "17974dc08ec82870b132612dcbeb062213bf594881dc764d6078865a7c694c57"))
		return 1;
  
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq $-0x10000, %rax         # imm = 0xFFFF0000
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq %rax, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
leaq 0x68(%rsp), %rsi
callq 0x8ce4
testl %eax, %eax
je 0x17a1
leaq 0xf720(%rip), %rdi      # 0x10ebc
jmp 0x1866
leaq 0xf6c5(%rip), %rdi      # 0x10e6d
callq 0x1060
movq 0x8(%rsp), %rsi
leaq 0x884b(%rip), %rdi      # 0xa004
xorl %eax, %eax
callq 0x1080
movq 0x10(%rsp), %rsi
leaq 0x884b(%rip), %rdi      # 0xa017
xorl %eax, %eax
callq 0x1080
movq 0x18(%rsp), %rsi
leaq 0x884b(%rip), %rdi      # 0xa02a
xorl %eax, %eax
callq 0x1080
movq 0x20(%rsp), %rsi
leaq 0x884b(%rip), %rdi      # 0xa03d
xorl %eax, %eax
callq 0x1080
movq 0x28(%rsp), %rsi
leaq 0x884b(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x1080
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,4), %rax
cmpq %rcx, %rax
jne 0x185f
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rdx
addq %rax, %rdx
cmpq %rcx, %rdx
jne 0x185f
cmpq $0x640, %rcx            # imm = 0x640
jne 0x1856
movq 0x18(%rsp), %rcx
leaq (%rcx,%rcx), %rdx
xorq %rdx, %rax
xorq $0x200, %rcx            # imm = 0x200
orq %rax, %rcx
je 0x187f
leaq 0xf635(%rip), %rdi      # 0x10e92
jmp 0x1866
leaq 0xf642(%rip), %rdi      # 0x10ea8
callq 0x1060
movl $0x1, %ebx
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0xa, %edi
callq 0x1040
movabsq $0xa380ff83122f04, %rax # imm = 0xA380FF83122F04
movq %rsp, %rbx
movq %rax, (%rbx)
movaps 0xf8a0(%rip), %xmm0     # 0x11140
movaps %xmm0, 0x50(%rsp)
xorl %eax, %eax
movb %al, 0x60(%rsp)
movaps 0xf8ae(%rip), %xmm0     # 0x11160
leaq 0x80(%rsp), %r14
movaps %xmm0, (%r14)
movb %al, 0x10(%r14)
leaq 0x8825(%rip), %rdi      # 0xa0ee
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %r15
movl $0x8, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8f64
movq %r15, %rdi
movq %r14, %rsi
callq 0x10c0
testl %eax, %eax
jne 0x1a35
leaq 0xf5ff(%rip), %rdi      # 0x10efe
callq 0x1060
leaq 0x8803(%rip), %rdi      # 0xa10e
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %rbx
movq %rsp, %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x8fa0
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
jne 0x1a35
leaq 0xf5bb(%rip), %rdi      # 0x10efe
callq 0x1060
leaq 0x87df(%rip), %rdi      # 0xa12e
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %rbx
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x91c4
movq (%rsp), %rax
cmpq (%rbx), %rax
jne 0x1a35
leaq 0xf582(%rip), %rdi      # 0x10efe
callq 0x1060
leaq 0x87cd(%rip), %rdi      # 0xa155
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %rbx
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x91c4
movq (%rsp), %rax
cmpq (%rbx), %rax
jne 0x1a35
leaq 0xf546(%rip), %rdi      # 0x10efe
callq 0x1060
movl $0xa, %edi
callq 0x1040
leaq 0x68(%rsp), %rdi
callq 0x1a41
movl $0x1, %ebx
testl %eax, %eax
jne 0x1870
callq 0x1c5b
testl %eax, %eax
jne 0x1870
callq 0x2ac4
testl %eax, %eax
jne 0x1870
callq 0x39a1
testl %eax, %eax
jne 0x1870
callq 0x3cc9
testl %eax, %eax
jne 0x1870
callq 0x3fe3
testl %eax, %eax
jne 0x1870
leaq 0x68(%rsp), %rdi
callq 0x44e1
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
jmp 0x1870
leaq 0xf4c5(%rip), %rdi      # 0x10f01
jmp 0x1866