// File: /workspace/github_cpp_makefile_star2_O3/pokorj54[P]Pathfinder-utilities/src/test.cpp
// Function: main
int main(void)
{
    //Arithmancy
    assert(GetDigitalRootOfSpell("") == 0);
    assert(GetDigitalRootOfSpell("a") == 1);
    assert(GetDigitalRootOfSpell("N") == 5);
    assert(GetDigitalRootOfSpell(",.=-") == 0);
    assert(GetDigitalRootOfSpell("Daze") == 9);
    assert(GetDigitalRootOfSpell("Fireball") == 2);
    assert(GetDigitalRootOfSpell("Warding Weapon") == 6);

    //Fractions
    assert(Fraction(4,2).ToString() == "2");
    assert(Fraction(5,3).ToString() == "5/3");
    assert(Add(Fraction(3,-4), Fraction(2)).ToString() == "5/4");
    assert(Multiply(Fraction(1,4), Fraction(2)).ToDouble() == 0.5);
    assert(Subtract(Fraction(3,4), Fraction(1,2)).ToString() == "1/4");
    assert(Divide(Fraction(1,2), Fraction(1,4)).ToDouble() == 2);

    Fraction f1 = Fraction(1,2), f2 = 2;
    assert(f1 < f2);
    assert(!(f2 < f1));
    assert(!(f1 < f1));
    assert(f2 > f1);
    assert(!(f1 > f2));
    assert(!(f2 > f2));
    assert(f1 <= f2);
    assert(!(f2 <= f1));
    assert(f1 <= f1);
    assert(f2 >= f1);
    assert(!(f1 >= f2));
    assert(f2 >= f2);
    assert(f1 != f2);
    assert(f2 != f1);
    assert(!(f1 != f1));
    assert(f1 == f1);
    assert(!(f1 == f2));
    assert(!(f2 == f1));
    
    //SacredGeometry
    int a[] = {3};
    assert(GetDesiredExpression(1, a, (sizeof(a)/sizeof(int))) == "3");
    assert(GetDesiredExpression(2, a, (sizeof(a)/sizeof(int))) == "");
    int b[] = {1,1,2,5};
    assert(GetDesiredExpression(2, b, (sizeof(b)/sizeof(int))) != "");
    assert(GetDesiredExpression(3, b, (sizeof(b)/sizeof(int))) == "");
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xc6e(%rip), %rdx       # 0x5153
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
testl %eax, %eax
jne 0x4b6e
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4513
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xd35(%rip), %rsi       # 0x5257
leaq 0xd2f(%rip), %rdx       # 0x5258
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x1, %eax
jne 0x4b8d
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4550
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xd1a(%rip), %rsi       # 0x5279
leaq 0xd14(%rip), %rdx       # 0x527a
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x5, %eax
jne 0x4bac
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x458d
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xcff(%rip), %rsi       # 0x529b
leaq 0xcfc(%rip), %rdx       # 0x529f
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
testl %eax, %eax
jne 0x4bcb
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x45c9
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xceb(%rip), %rsi       # 0x52c3
leaq 0xce8(%rip), %rdx       # 0x52c7
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x9, %eax
jne 0x4bea
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4606
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xcd6(%rip), %rsi       # 0x52eb
leaq 0xcd7(%rip), %rdx       # 0x52f3
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x2, %eax
jne 0x4c09
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4643
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xcc9(%rip), %rsi       # 0x531b
leaq 0xcd0(%rip), %rdx       # 0x5329
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x6, %eax
jne 0x4c28
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4680
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x23f6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2442
leaq 0xc6b(%rip), %rsi       # 0x5319
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4c47
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x46cd
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x5, %esi
movl $0x3, %edx
callq 0x23f6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2442
leaq 0xc7c(%rip), %rsi       # 0x5377
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4c66
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x471a
callq 0x2160
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x23f6
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x23f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28be
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2442
leaq 0xc30(%rip), %rsi       # 0x539d
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4c85
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x478c
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x23f6
movq %rsp, %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x23f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2997
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
callq 0x27b2
ucomisd 0xa38(%rip), %xmm0      # 0x5210
jne 0x4ca4
jp 0x4ca4
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0x4, %edx
callq 0x23f6
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x23f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2944
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2442
leaq 0xbd6(%rip), %rsi       # 0x540d
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4cc3
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4856
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x23f6
movq %rsp, %r14
movq %r14, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x23f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27d8
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
callq 0x27b2
ucomisd 0x976(%rip), %xmm0      # 0x5218
jne 0x4ce2
jp 0x4ce2
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x23f6
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x23f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27c4
testb %al, %al
je 0x4d01
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x27c4
testb %al, %al
jne 0x4d20
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x27c4
testb %al, %al
jne 0x4d3f
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2826
testb %al, %al
je 0x4d5e
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2826
testb %al, %al
jne 0x4d7d
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
callq 0x2826
testb %al, %al
jne 0x4d9c
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2844
testb %al, %al
je 0x4dbb
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2844
testb %al, %al
jne 0x4dda
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x2844
testb %al, %al
je 0x4df9
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2862
testb %al, %al
je 0x4e18
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2862
testb %al, %al
jne 0x4e37
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
callq 0x2862
testb %al, %al
je 0x4e56
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2876
testb %al, %al
je 0x4e75
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2876
testb %al, %al
je 0x4e94
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x2876
testb %al, %al
jne 0x4eb3
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x28b4
testb %al, %al
je 0x4ed2
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x28b4
testb %al, %al
jne 0x4ef1
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x28b4
testb %al, %al
jne 0x4f10
leaq 0x4c(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %ecx
callq 0x3fcc
leaq 0x906(%rip), %rsi       # 0x5379
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4f2f
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a92
callq 0x2160
leaq 0x10(%rsp), %rbx
leaq 0x4c(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %ecx
callq 0x3fcc
leaq 0x69e(%rip), %rsi       # 0x5153
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4f4e
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ad4
callq 0x2160
movaps 0xb55(%rip), %xmm0      # 0x5630
leaq 0x30(%rsp), %rdx
movaps %xmm0, (%rdx)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
movl $0x4, %ecx
callq 0x3fcc
leaq 0x652(%rip), %rsi       # 0x5153
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x4f6d
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4b20
callq 0x2160
leaq 0x10(%rsp), %rbx
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
movl $0x4, %ecx
callq 0x3fcc
leaq 0x610(%rip), %rsi       # 0x5153
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4f8c
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4b62
callq 0x2160
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6ab(%rip), %rdi       # 0x5220
leaq 0x6c3(%rip), %rsi       # 0x523f
leaq 0x6c9(%rip), %rcx       # 0x524c
movl $0xd, %edx
callq 0x20f0
leaq 0x6c5(%rip), %rdi       # 0x5259
leaq 0x6a4(%rip), %rsi       # 0x523f
leaq 0x6aa(%rip), %rcx       # 0x524c
movl $0xe, %edx
callq 0x20f0
leaq 0x6c8(%rip), %rdi       # 0x527b
leaq 0x685(%rip), %rsi       # 0x523f
leaq 0x68b(%rip), %rcx       # 0x524c
movl $0xf, %edx
callq 0x20f0
leaq 0x6ce(%rip), %rdi       # 0x52a0
leaq 0x666(%rip), %rsi       # 0x523f
leaq 0x66c(%rip), %rcx       # 0x524c
movl $0x10, %edx
callq 0x20f0
leaq 0x6d7(%rip), %rdi       # 0x52c8
leaq 0x647(%rip), %rsi       # 0x523f
leaq 0x64d(%rip), %rcx       # 0x524c
movl $0x11, %edx
callq 0x20f0
leaq 0x6e4(%rip), %rdi       # 0x52f4
leaq 0x628(%rip), %rsi       # 0x523f
leaq 0x62e(%rip), %rcx       # 0x524c
movl $0x12, %edx
callq 0x20f0
leaq 0x6fb(%rip), %rdi       # 0x532a
leaq 0x609(%rip), %rsi       # 0x523f
leaq 0x60f(%rip), %rcx       # 0x524c
movl $0x13, %edx
callq 0x20f0
leaq 0x709(%rip), %rdi       # 0x5357
leaq 0x5ea(%rip), %rsi       # 0x523f
leaq 0x5f0(%rip), %rcx       # 0x524c
movl $0x16, %edx
callq 0x20f0
leaq 0x70e(%rip), %rdi       # 0x537b
leaq 0x5cb(%rip), %rsi       # 0x523f
leaq 0x5d1(%rip), %rcx       # 0x524c
movl $0x17, %edx
callq 0x20f0
leaq 0x715(%rip), %rdi       # 0x53a1
leaq 0x5ac(%rip), %rsi       # 0x523f
leaq 0x5b2(%rip), %rcx       # 0x524c
movl $0x18, %edx
callq 0x20f0
leaq 0x72b(%rip), %rdi       # 0x53d6
leaq 0x58d(%rip), %rsi       # 0x523f
leaq 0x593(%rip), %rcx       # 0x524c
movl $0x19, %edx
callq 0x20f0
leaq 0x747(%rip), %rdi       # 0x5411
leaq 0x56e(%rip), %rsi       # 0x523f
leaq 0x574(%rip), %rcx       # 0x524c
movl $0x1a, %edx
callq 0x20f0
leaq 0x763(%rip), %rdi       # 0x544c
leaq 0x54f(%rip), %rsi       # 0x523f
leaq 0x555(%rip), %rcx       # 0x524c
movl $0x1b, %edx
callq 0x20f0
leaq 0x779(%rip), %rdi       # 0x5481
leaq 0x530(%rip), %rsi       # 0x523f
leaq 0x536(%rip), %rcx       # 0x524c
movl $0x1e, %edx
callq 0x20f0
leaq 0x762(%rip), %rdi       # 0x5489
leaq 0x511(%rip), %rsi       # 0x523f
leaq 0x517(%rip), %rcx       # 0x524c
movl $0x1f, %edx
callq 0x20f0
leaq 0x74e(%rip), %rdi       # 0x5494
leaq 0x4f2(%rip), %rsi       # 0x523f
leaq 0x4f8(%rip), %rcx       # 0x524c
movl $0x20, %edx
callq 0x20f0
leaq 0x73a(%rip), %rdi       # 0x549f
leaq 0x4d3(%rip), %rsi       # 0x523f
leaq 0x4d9(%rip), %rcx       # 0x524c
movl $0x21, %edx
callq 0x20f0
leaq 0x723(%rip), %rdi       # 0x54a7
leaq 0x4b4(%rip), %rsi       # 0x523f
leaq 0x4ba(%rip), %rcx       # 0x524c
movl $0x22, %edx
callq 0x20f0
leaq 0x70f(%rip), %rdi       # 0x54b2
leaq 0x495(%rip), %rsi       # 0x523f
leaq 0x49b(%rip), %rcx       # 0x524c
movl $0x23, %edx
callq 0x20f0
leaq 0x6fb(%rip), %rdi       # 0x54bd
leaq 0x476(%rip), %rsi       # 0x523f
leaq 0x47c(%rip), %rcx       # 0x524c
movl $0x24, %edx
callq 0x20f0
leaq 0x6e5(%rip), %rdi       # 0x54c6
leaq 0x457(%rip), %rsi       # 0x523f
leaq 0x45d(%rip), %rcx       # 0x524c
movl $0x25, %edx
callq 0x20f0
leaq 0x6d2(%rip), %rdi       # 0x54d2
leaq 0x438(%rip), %rsi       # 0x523f
leaq 0x43e(%rip), %rcx       # 0x524c
movl $0x26, %edx
callq 0x20f0
leaq 0x6bc(%rip), %rdi       # 0x54db
leaq 0x419(%rip), %rsi       # 0x523f
leaq 0x41f(%rip), %rcx       # 0x524c
movl $0x27, %edx
callq 0x20f0
leaq 0x6a6(%rip), %rdi       # 0x54e4
leaq 0x3fa(%rip), %rsi       # 0x523f
leaq 0x400(%rip), %rcx       # 0x524c
movl $0x28, %edx
callq 0x20f0
leaq 0x693(%rip), %rdi       # 0x54f0
leaq 0x3db(%rip), %rsi       # 0x523f
leaq 0x3e1(%rip), %rcx       # 0x524c
movl $0x29, %edx
callq 0x20f0
leaq 0x67d(%rip), %rdi       # 0x54f9
leaq 0x3bc(%rip), %rsi       # 0x523f
leaq 0x3c2(%rip), %rcx       # 0x524c
movl $0x2a, %edx
callq 0x20f0
leaq 0x667(%rip), %rdi       # 0x5502
leaq 0x39d(%rip), %rsi       # 0x523f
leaq 0x3a3(%rip), %rcx       # 0x524c
movl $0x2b, %edx
callq 0x20f0
leaq 0x651(%rip), %rdi       # 0x550b
leaq 0x37e(%rip), %rsi       # 0x523f
leaq 0x384(%rip), %rcx       # 0x524c
movl $0x2c, %edx
callq 0x20f0
leaq 0x63e(%rip), %rdi       # 0x5517
leaq 0x35f(%rip), %rsi       # 0x523f
leaq 0x365(%rip), %rcx       # 0x524c
movl $0x2d, %edx
callq 0x20f0
leaq 0x628(%rip), %rdi       # 0x5520
leaq 0x340(%rip), %rsi       # 0x523f
leaq 0x346(%rip), %rcx       # 0x524c
movl $0x2e, %edx
callq 0x20f0
leaq 0x615(%rip), %rdi       # 0x552c
leaq 0x321(%rip), %rsi       # 0x523f
leaq 0x327(%rip), %rcx       # 0x524c
movl $0x2f, %edx
callq 0x20f0
leaq 0x602(%rip), %rdi       # 0x5538
leaq 0x302(%rip), %rsi       # 0x523f
leaq 0x308(%rip), %rcx       # 0x524c
movl $0x33, %edx
callq 0x20f0
leaq 0x61e(%rip), %rdi       # 0x5573
leaq 0x2e3(%rip), %rsi       # 0x523f
leaq 0x2e9(%rip), %rcx       # 0x524c
movl $0x34, %edx
callq 0x20f0
leaq 0x639(%rip), %rdi       # 0x55ad
leaq 0x2c4(%rip), %rsi       # 0x523f
leaq 0x2ca(%rip), %rcx       # 0x524c
movl $0x36, %edx
callq 0x20f0
leaq 0x654(%rip), %rdi       # 0x55e7
leaq 0x2a5(%rip), %rsi       # 0x523f
leaq 0x2ab(%rip), %rcx       # 0x524c
movl $0x37, %edx
callq 0x20f0
jmp 0x4fc3
jmp 0x4fd7
jmp 0x4fc3
jmp 0x4fd7
jmp 0x4fc3
jmp 0x4fd7
jmp 0x4fc3
jmp 0x4fd7
jmp 0x4fc3
jmp 0x4fd7
jmp 0x4fc3
jmp 0x4fd7
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4fda
callq 0x2160
jmp 0x4fda
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2260