// File: /workspace/github_cpp_makefile_star2_O1/DiplIngFrankGerlach[P]MST/UnitTest.cpp
// Function: unitTestSuite()
void unitTestSuite()
{
   testProc(1); 
   testProc(16); 
   testProc(15); 
   testProc(77); 
   testProc(32);
   testProc(256);
   testProc(2200);
   testProc(2048);
   //testProc(1000000);

   {
	   uint8_t ctr[]={1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
	   uint8_t desiredResult[]={2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
	   MST_Endpoint::incrementMC(ctr);
	   assert(memcmp(ctr,desiredResult,16)==0);

   }
   {   
	   uint8_t ctr[]={255,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
	   uint8_t desiredResult[]={0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
	   MST_Endpoint::incrementMC(ctr);

	   assert(memcmp(ctr,desiredResult,16)==0);
   }
   {   
	   uint8_t ctr[]={255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
	   uint8_t desiredResult[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	   MST_Endpoint::incrementMC(ctr);

	   assert(memcmp(ctr,desiredResult,16)==0);
   }
   {   
	   uint8_t ctr[]={255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255};
	   uint8_t desiredResult[]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255};
	   MST_Endpoint::incrementMC(ctr);

	   assert(memcmp(ctr,desiredResult,16)==0);
   }
   encryptedCommunicationExample();
   encryptedCommunicationFailTest();

   replayAttackFailTest();
   duplicateObfuscationTest();
   
   encryptedCommunicationExampleComplex();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x1, %edi
callq 0x370c
movl $0x10, %edi
callq 0x370c
movl $0xf, %edi
callq 0x370c
movl $0x4d, %edi
callq 0x370c
movl $0x20, %edi
callq 0x370c
movl $0x100, %edi            # imm = 0x100
callq 0x370c
movl $0x898, %edi            # imm = 0x898
callq 0x370c
movl $0x800, %edi            # imm = 0x800
callq 0x370c
movaps 0x137c(%rip), %xmm0     # 0x58b0
movaps %xmm0, -0x10(%rbp)
xorl %eax, %eax
incb -0x10(%rbp,%rax)
sete %cl
cmpq $0xe, %rax
ja 0x454e
incq %rax
testb %cl, %cl
jne 0x453a
movdqa -0x10(%rbp), %xmm0
pcmpeqb 0x1365(%rip), %xmm0     # 0x58c0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x463f
movaps 0x138f(%rip), %xmm0     # 0x5900
movaps %xmm0, -0x10(%rbp)
xorl %eax, %eax
incb -0x10(%rbp,%rax)
sete %cl
cmpq $0xe, %rax
ja 0x458b
incq %rax
testb %cl, %cl
jne 0x4577
movdqa -0x10(%rbp), %xmm0
pcmpeqb 0x1338(%rip), %xmm0     # 0x58d0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x465e
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, -0x10(%rbp)
pxor %xmm0, %xmm0
movdqa %xmm0, -0x20(%rbp)
xorl %eax, %eax
incb -0x10(%rbp,%rax)
sete %cl
cmpq $0xe, %rax
ja 0x45cf
incq %rax
testb %cl, %cl
jne 0x45bb
movdqa -0x10(%rbp), %xmm0
pcmpeqb -0x20(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x467d
movaps 0x1321(%rip), %xmm0     # 0x5910
movaps %xmm0, -0x10(%rbp)
xorl %eax, %eax
incb -0x10(%rbp,%rax)
sete %cl
cmpq $0xe, %rax
ja 0x4609
incq %rax
testb %cl, %cl
jne 0x45f5
movdqa -0x10(%rbp), %xmm0
pcmpeqb 0x12ca(%rip), %xmm0     # 0x58e0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x469c
callq 0x38c4
callq 0x3f35
callq 0x40ab
callq 0x428d
addq $0x20, %rsp
popq %rbp
jmp 0x3b7a
leaq 0x18d4(%rip), %rdi      # 0x5f1a
leaq 0x132d(%rip), %rsi      # 0x597a
leaq 0x18e6(%rip), %rcx      # 0x5f3a
movl $0x115, %edx            # imm = 0x115
callq 0x1090
leaq 0x18b5(%rip), %rdi      # 0x5f1a
leaq 0x130e(%rip), %rsi      # 0x597a
leaq 0x18c7(%rip), %rcx      # 0x5f3a
movl $0x11d, %edx            # imm = 0x11D
callq 0x1090
leaq 0x1896(%rip), %rdi      # 0x5f1a
leaq 0x12ef(%rip), %rsi      # 0x597a
leaq 0x18a8(%rip), %rcx      # 0x5f3a
movl $0x124, %edx            # imm = 0x124
callq 0x1090
leaq 0x1877(%rip), %rdi      # 0x5f1a
leaq 0x12d0(%rip), %rsi      # 0x597a
leaq 0x1889(%rip), %rcx      # 0x5f3a
movl $0x12b, %edx            # imm = 0x12B
callq 0x1090
nop