// File: /workspace/github_c_makefile_star2_O3/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 0x9350
testl %eax, %eax
je 0x1511
leaq 0xf9b0(%rip), %rdi      # 0x10ebc
jmp 0x15d0
leaq 0xf955(%rip), %rdi      # 0x10e6d
callq 0x1060
movq 0x8(%rsp), %rsi
leaq 0x8adb(%rip), %rdi      # 0xa004
xorl %eax, %eax
callq 0x1080
movq 0x10(%rsp), %rsi
leaq 0x8adb(%rip), %rdi      # 0xa017
xorl %eax, %eax
callq 0x1080
movq 0x18(%rsp), %rsi
leaq 0x8adb(%rip), %rdi      # 0xa02a
xorl %eax, %eax
callq 0x1080
movq 0x20(%rsp), %rsi
leaq 0x8adb(%rip), %rdi      # 0xa03d
xorl %eax, %eax
callq 0x1080
movq 0x28(%rsp), %rsi
leaq 0x8adb(%rip), %rdi      # 0xa050
xorl %eax, %eax
callq 0x1080
movq 0x28(%rsp), %rcx
leaq (%rcx,%rcx,4), %rax
leaq (%rax,%rax,4), %rdx
cmpq 0x20(%rsp), %rdx
jne 0x15c9
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rsi
addq %rax, %rsi
cmpq %rdx, %rsi
jne 0x15c9
cmpq $0x40, %rcx
jne 0x15c0
movq 0x18(%rsp), %rcx
leaq (%rcx,%rcx), %rdx
xorq %rdx, %rax
xorq $0x200, %rcx            # imm = 0x200
orq %rax, %rcx
je 0x15e9
leaq 0xf8cb(%rip), %rdi      # 0x10e92
jmp 0x15d0
leaq 0xf8d8(%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 0xfb36(%rip), %xmm0     # 0x11140
movaps %xmm0, 0x50(%rsp)
xorl %eax, %eax
movb %al, 0x60(%rsp)
movaps 0xfb44(%rip), %xmm0     # 0x11160
leaq 0x80(%rsp), %r14
movaps %xmm0, (%r14)
movb %al, 0x10(%r14)
leaq 0x8abb(%rip), %rdi      # 0xa0ee
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %r15
movl $0x8, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x95c8
movq %r15, %rdi
movq %r14, %rsi
callq 0x10c0
testl %eax, %eax
jne 0x179f
leaq 0xf895(%rip), %rdi      # 0x10efe
callq 0x1060
leaq 0x8a99(%rip), %rdi      # 0xa10e
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %rbx
movq %rsp, %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x9604
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
jne 0x179f
leaq 0xf851(%rip), %rdi      # 0x10efe
callq 0x1060
leaq 0x8a75(%rip), %rdi      # 0xa12e
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %rbx
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x9828
movq (%rsp), %rax
cmpq (%rbx), %rax
jne 0x179f
leaq 0xf818(%rip), %rdi      # 0x10efe
callq 0x1060
leaq 0x8a63(%rip), %rdi      # 0xa155
xorl %eax, %eax
callq 0x1080
leaq 0x30(%rsp), %rbx
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x9828
movq (%rsp), %rax
cmpq (%rbx), %rax
jne 0x179f
leaq 0xf7dc(%rip), %rdi      # 0x10efe
callq 0x1060
movl $0xa, %edi
callq 0x1040
leaq 0x68(%rsp), %rdi
callq 0x17ab
movl $0x1, %ebx
testl %eax, %eax
jne 0x15da
callq 0x19ca
testl %eax, %eax
jne 0x15da
callq 0x2833
testl %eax, %eax
jne 0x15da
callq 0x3710
testl %eax, %eax
jne 0x15da
callq 0x3a38
testl %eax, %eax
jne 0x15da
callq 0x3d52
testl %eax, %eax
jne 0x15da
leaq 0x68(%rsp), %rdi
callq 0x4244
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
jmp 0x15da
leaq 0xf75b(%rip), %rdi      # 0x10f01
jmp 0x15d0