// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq 0x1712(%rip), %rsi      # 0x5153
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x27f5
testl %eax, %eax
jne 0x4032
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x17b4(%rip), %rsi      # 0x5227
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x27f5
cmpl $0x1, %eax
jne 0x404e
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x17a3(%rip), %rsi      # 0x5249
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x27f5
cmpl $0x5, %eax
jne 0x406a
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x1792(%rip), %rsi      # 0x526b
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x27f5
testl %eax, %eax
jne 0x4086
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x1788(%rip), %rsi      # 0x5293
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x27f5
cmpl $0x9, %eax
jne 0x40a2
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x177d(%rip), %rsi      # 0x52bb
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x27f5
cmpl $0x2, %eax
jne 0x40be
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x177a(%rip), %rsi      # 0x52eb
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2090
leaq 0x10(%rsp), %rdi
callq 0x27f5
cmpl $0x6, %eax
jne 0x40da
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x30(%rsp), %rbx
pushq $0x4
popq %rsi
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0x23ec
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x243c
leaq 0x1722(%rip), %rsi      # 0x52e9
movq %r14, %rdi
callq 0x3a23
testb %al, %al
je 0x40f6
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x30(%rsp), %rbx
pushq $0x5
popq %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x23ec
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x243c
leaq 0x173c(%rip), %rsi      # 0x5347
movq %r14, %rdi
callq 0x3a23
testb %al, %al
je 0x4112
leaq 0x10(%rsp), %rdi
callq 0x20c0
movq %rsp, %rbx
pushq $0x3
popq %rsi
pushq $-0x4
popq %rdx
movq %rbx, %rdi
callq 0x23ec
leaq 0x8(%rsp), %r14
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x23ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25c0
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x243c
leaq 0x16fd(%rip), %rsi      # 0x536d
movq %rbx, %rdi
callq 0x3a23
testb %al, %al
je 0x412e
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20c0
leaq 0x30(%rsp), %r14
pushq $0x1
popq %rbp
pushq $0x4
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x23ec
movq %rsp, %r15
pushq $0x2
popq %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0x23ec
movq %r14, %rdi
movq %r15, %rsi
callq 0x262d
movq %rax, (%rbx)
leaq 0x10(%rsp), %rdi
callq 0x2500
ucomisd 0x150e(%rip), %xmm0     # 0x51e0
jne 0x414a
jp 0x414a
movq %rsp, %rbx
pushq $0x3
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x23ec
leaq 0x8(%rsp), %r14
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x23ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25fa
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x243c
leaq 0x16b4(%rip), %rsi      # 0x53dd
movq %rbx, %rdi
callq 0x3a23
testb %al, %al
je 0x4166
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20c0
leaq 0x30(%rsp), %r14
pushq $0x1
popq %rbp
pushq $0x2
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x23ec
movq %rsp, %r15
pushq $0x4
popq %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x23ec
movq %r14, %rdi
movq %r15, %rsi
callq 0x2526
movq %rax, (%rbx)
leaq 0x10(%rsp), %rdi
callq 0x2500
ucomisd 0x145d(%rip), %xmm0     # 0x51e8
jne 0x4182
jp 0x4182
movq %rsp, %rbx
pushq $0x1
popq %rbp
pushq $0x2
popq %r14
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x23ec
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x23ec
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2512
testb %al, %al
je 0x419e
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2512
testb %al, %al
jne 0x41ba
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x2512
testb %al, %al
jne 0x41d6
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x255a
testb %al, %al
je 0x41f2
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x255a
testb %al, %al
jne 0x420e
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
callq 0x255a
testb %al, %al
jne 0x422a
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2568
testb %al, %al
je 0x4246
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2568
testb %al, %al
jne 0x4262
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x2568
testb %al, %al
je 0x427e
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x257c
testb %al, %al
je 0x429a
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x257c
testb %al, %al
jne 0x42b6
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
callq 0x257c
testb %al, %al
je 0x42d2
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2586
testb %al, %al
je 0x42ee
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2586
testb %al, %al
je 0x430a
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x2586
testb %al, %al
jne 0x4326
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x25b6
testb %al, %al
je 0x4342
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x25b6
testb %al, %al
jne 0x435e
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x25b6
testb %al, %al
jne 0x4377
leaq 0x44(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x10(%rsp), %rbx
pushq $0x1
popq %rcx
movq %rbx, %rdi
movl %ecx, %esi
callq 0x3628
leaq 0x13f5(%rip), %rsi      # 0x5349
movq %rbx, %rdi
callq 0x3a23
testb %al, %al
je 0x4390
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x10(%rsp), %rbx
pushq $0x2
popq %rsi
leaq 0x44(%rsp), %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x3628
leaq 0x11c6(%rip), %rsi      # 0x5153
movq %rbx, %rdi
callq 0x3a23
testb %al, %al
je 0x43a9
leaq 0x10(%rsp), %rdi
callq 0x20c0
movapd 0x1651(%rip), %xmm0     # 0x5600
leaq 0x30(%rsp), %rdx
movapd %xmm0, (%rdx)
leaq 0x10(%rsp), %rbx
pushq $0x2
popq %rsi
pushq $0x4
popq %rcx
movq %rbx, %rdi
callq 0x3628
leaq 0x1181(%rip), %rsi      # 0x5153
movq %rbx, %rdi
callq 0x393a
testb %al, %al
je 0x43c2
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x10(%rsp), %rbx
pushq $0x3
popq %rsi
leaq 0x30(%rsp), %rdx
pushq $0x4
popq %rcx
movq %rbx, %rdi
callq 0x3628
leaq 0x1148(%rip), %rsi      # 0x5153
movq %rbx, %rdi
callq 0x3a23
testb %al, %al
je 0x43db
leaq 0x10(%rsp), %rdi
callq 0x20c0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11b7(%rip), %rdi      # 0x51f0
leaq 0x11cf(%rip), %rsi      # 0x520f
leaq 0x11d5(%rip), %rcx      # 0x521c
pushq $0xd
jmp 0x43f2
leaq 0x11d4(%rip), %rdi      # 0x5229
leaq 0x11b3(%rip), %rsi      # 0x520f
leaq 0x11b9(%rip), %rcx      # 0x521c
pushq $0xe
jmp 0x43f2
leaq 0x11da(%rip), %rdi      # 0x524b
leaq 0x1197(%rip), %rsi      # 0x520f
leaq 0x119d(%rip), %rcx      # 0x521c
pushq $0xf
jmp 0x43f2
leaq 0x11e3(%rip), %rdi      # 0x5270
leaq 0x117b(%rip), %rsi      # 0x520f
leaq 0x1181(%rip), %rcx      # 0x521c
pushq $0x10
jmp 0x43f2
leaq 0x11ef(%rip), %rdi      # 0x5298
leaq 0x115f(%rip), %rsi      # 0x520f
leaq 0x1165(%rip), %rcx      # 0x521c
pushq $0x11
jmp 0x43f2
leaq 0x11ff(%rip), %rdi      # 0x52c4
leaq 0x1143(%rip), %rsi      # 0x520f
leaq 0x1149(%rip), %rcx      # 0x521c
pushq $0x12
jmp 0x43f2
leaq 0x1219(%rip), %rdi      # 0x52fa
leaq 0x1127(%rip), %rsi      # 0x520f
leaq 0x112d(%rip), %rcx      # 0x521c
pushq $0x13
jmp 0x43f2
leaq 0x122a(%rip), %rdi      # 0x5327
leaq 0x110b(%rip), %rsi      # 0x520f
leaq 0x1111(%rip), %rcx      # 0x521c
pushq $0x16
jmp 0x43f2
leaq 0x1232(%rip), %rdi      # 0x534b
leaq 0x10ef(%rip), %rsi      # 0x520f
leaq 0x10f5(%rip), %rcx      # 0x521c
pushq $0x17
jmp 0x43f2
leaq 0x123c(%rip), %rdi      # 0x5371
leaq 0x10d3(%rip), %rsi      # 0x520f
leaq 0x10d9(%rip), %rcx      # 0x521c
pushq $0x18
jmp 0x43f2
leaq 0x1255(%rip), %rdi      # 0x53a6
leaq 0x10b7(%rip), %rsi      # 0x520f
leaq 0x10bd(%rip), %rcx      # 0x521c
pushq $0x19
jmp 0x43f2
leaq 0x1274(%rip), %rdi      # 0x53e1
leaq 0x109b(%rip), %rsi      # 0x520f
leaq 0x10a1(%rip), %rcx      # 0x521c
pushq $0x1a
jmp 0x43f2
leaq 0x1293(%rip), %rdi      # 0x541c
leaq 0x107f(%rip), %rsi      # 0x520f
leaq 0x1085(%rip), %rcx      # 0x521c
pushq $0x1b
jmp 0x43f2
leaq 0x12ac(%rip), %rdi      # 0x5451
leaq 0x1063(%rip), %rsi      # 0x520f
leaq 0x1069(%rip), %rcx      # 0x521c
pushq $0x1e
jmp 0x43f2
leaq 0x1298(%rip), %rdi      # 0x5459
leaq 0x1047(%rip), %rsi      # 0x520f
leaq 0x104d(%rip), %rcx      # 0x521c
pushq $0x1f
jmp 0x43f2
leaq 0x1287(%rip), %rdi      # 0x5464
leaq 0x102b(%rip), %rsi      # 0x520f
leaq 0x1031(%rip), %rcx      # 0x521c
pushq $0x20
jmp 0x43f2
leaq 0x1276(%rip), %rdi      # 0x546f
leaq 0x100f(%rip), %rsi      # 0x520f
leaq 0x1015(%rip), %rcx      # 0x521c
pushq $0x21
jmp 0x43f2
leaq 0x1262(%rip), %rdi      # 0x5477
leaq 0xff3(%rip), %rsi       # 0x520f
leaq 0xff9(%rip), %rcx       # 0x521c
pushq $0x22
jmp 0x43f2
leaq 0x1251(%rip), %rdi      # 0x5482
leaq 0xfd7(%rip), %rsi       # 0x520f
leaq 0xfdd(%rip), %rcx       # 0x521c
pushq $0x23
jmp 0x43f2
leaq 0x1240(%rip), %rdi      # 0x548d
leaq 0xfbb(%rip), %rsi       # 0x520f
leaq 0xfc1(%rip), %rcx       # 0x521c
pushq $0x24
jmp 0x43f2
leaq 0x122d(%rip), %rdi      # 0x5496
leaq 0xf9f(%rip), %rsi       # 0x520f
leaq 0xfa5(%rip), %rcx       # 0x521c
pushq $0x25
jmp 0x43f2
leaq 0x121d(%rip), %rdi      # 0x54a2
leaq 0xf83(%rip), %rsi       # 0x520f
leaq 0xf89(%rip), %rcx       # 0x521c
pushq $0x26
jmp 0x43f2
leaq 0x120a(%rip), %rdi      # 0x54ab
leaq 0xf67(%rip), %rsi       # 0x520f
leaq 0xf6d(%rip), %rcx       # 0x521c
pushq $0x27
jmp 0x43f2
leaq 0x11f7(%rip), %rdi      # 0x54b4
leaq 0xf4b(%rip), %rsi       # 0x520f
leaq 0xf51(%rip), %rcx       # 0x521c
pushq $0x28
jmp 0x43f2
leaq 0x11e7(%rip), %rdi      # 0x54c0
leaq 0xf2f(%rip), %rsi       # 0x520f
leaq 0xf35(%rip), %rcx       # 0x521c
pushq $0x29
jmp 0x43f2
leaq 0x11d4(%rip), %rdi      # 0x54c9
leaq 0xf13(%rip), %rsi       # 0x520f
leaq 0xf19(%rip), %rcx       # 0x521c
pushq $0x2a
jmp 0x43f2
leaq 0x11c1(%rip), %rdi      # 0x54d2
leaq 0xef7(%rip), %rsi       # 0x520f
leaq 0xefd(%rip), %rcx       # 0x521c
pushq $0x2b
jmp 0x43f2
leaq 0x11ae(%rip), %rdi      # 0x54db
leaq 0xedb(%rip), %rsi       # 0x520f
leaq 0xee1(%rip), %rcx       # 0x521c
pushq $0x2c
jmp 0x43f2
leaq 0x119e(%rip), %rdi      # 0x54e7
leaq 0xebf(%rip), %rsi       # 0x520f
leaq 0xec5(%rip), %rcx       # 0x521c
pushq $0x2d
jmp 0x43f2
leaq 0x118b(%rip), %rdi      # 0x54f0
leaq 0xea3(%rip), %rsi       # 0x520f
leaq 0xea9(%rip), %rcx       # 0x521c
pushq $0x2e
jmp 0x43f2
leaq 0x117e(%rip), %rdi      # 0x54fc
leaq 0xe8a(%rip), %rsi       # 0x520f
leaq 0xe90(%rip), %rcx       # 0x521c
pushq $0x2f
jmp 0x43f2
leaq 0x1171(%rip), %rdi      # 0x5508
leaq 0xe71(%rip), %rsi       # 0x520f
leaq 0xe77(%rip), %rcx       # 0x521c
pushq $0x33
jmp 0x43f2
leaq 0x1193(%rip), %rdi      # 0x5543
leaq 0xe58(%rip), %rsi       # 0x520f
leaq 0xe5e(%rip), %rcx       # 0x521c
pushq $0x34
jmp 0x43f2
leaq 0x11b4(%rip), %rdi      # 0x557d
leaq 0xe3f(%rip), %rsi       # 0x520f
leaq 0xe45(%rip), %rcx       # 0x521c
pushq $0x36
jmp 0x43f2
leaq 0x11d5(%rip), %rdi      # 0x55b7
leaq 0xe26(%rip), %rsi       # 0x520f
leaq 0xe2c(%rip), %rcx       # 0x521c
pushq $0x37
popq %rdx
callq 0x2100
jmp 0x4410
jmp 0x441f
jmp 0x4410
jmp 0x441f
jmp 0x4410
jmp 0x441f
jmp 0x4410
jmp 0x441f
jmp 0x4410
jmp 0x441f
jmp 0x4410
jmp 0x441f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20c0
jmp 0x4422
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2260