// File: /workspace/github_cpp_makefile_star2_O1/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 0x1b5a(%rip), %rdx      # 0x6153
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
testl %eax, %eax
jne 0x4c82
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4627
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1c21(%rip), %rsi      # 0x6257
leaq 0x1c1b(%rip), %rdx      # 0x6258
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x1, %eax
jne 0x4ca1
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4664
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1c06(%rip), %rsi      # 0x6279
leaq 0x1c00(%rip), %rdx      # 0x627a
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x5, %eax
jne 0x4cc0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x46a1
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1beb(%rip), %rsi      # 0x629b
leaq 0x1be8(%rip), %rdx      # 0x629f
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
testl %eax, %eax
jne 0x4cdf
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x46dd
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1bd7(%rip), %rsi      # 0x62c3
leaq 0x1bd4(%rip), %rdx      # 0x62c7
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x9, %eax
jne 0x4cfe
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x471a
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1bc2(%rip), %rsi      # 0x62eb
leaq 0x1bc3(%rip), %rdx      # 0x62f3
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x2, %eax
jne 0x4d1d
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4757
callq 0x2160
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x1bb5(%rip), %rsi      # 0x631b
leaq 0x1bbc(%rip), %rdx      # 0x6329
callq 0x3084
leaq 0x10(%rsp), %rdi
callq 0x2ac0
cmpl $0x6, %eax
jne 0x4d3c
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4794
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x4, %esi
movl $0x2, %edx
callq 0x23ec
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2436
leaq 0x1b57(%rip), %rsi      # 0x6319
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4d5b
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x47e1
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x5, %esi
movl $0x3, %edx
callq 0x23ec
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2436
leaq 0x1b68(%rip), %rsi      # 0x6377
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4d7a
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x482e
callq 0x2160
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0xfffffffc, %edx       # imm = 0xFFFFFFFC
callq 0x23ec
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x23ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28c8
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2436
leaq 0x1b1c(%rip), %rsi      # 0x639d
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4d99
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x48a0
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x23ec
movq %rsp, %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x23ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29a2
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
callq 0x27a8
ucomisd 0x1924(%rip), %xmm0     # 0x6210
jne 0x4db8
jp 0x4db8
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0x4, %edx
callq 0x23ec
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x23ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x293f
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x2436
leaq 0x1ac2(%rip), %rsi      # 0x640d
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x4dd7
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x496a
callq 0x2160
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x23ec
movq %rsp, %r14
movq %r14, %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x23ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27ce
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
callq 0x27a8
ucomisd 0x1862(%rip), %xmm0     # 0x6218
jne 0x4df6
jp 0x4df6
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x23ec
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x23ec
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27ba
testb %al, %al
je 0x4e15
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x27ba
testb %al, %al
jne 0x4e34
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x27ba
testb %al, %al
jne 0x4e53
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2830
testb %al, %al
je 0x4e72
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2830
testb %al, %al
jne 0x4e91
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
callq 0x2830
testb %al, %al
jne 0x4eb0
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x284e
testb %al, %al
je 0x4ecf
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x284e
testb %al, %al
jne 0x4eee
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x284e
testb %al, %al
je 0x4f0d
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x286c
testb %al, %al
je 0x4f2c
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x286c
testb %al, %al
jne 0x4f4b
leaq 0x8(%rsp), %rdi
movq %rdi, %rsi
callq 0x286c
testb %al, %al
je 0x4f6a
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2880
testb %al, %al
je 0x4f89
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x2880
testb %al, %al
je 0x4fa8
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x2880
testb %al, %al
jne 0x4fc7
movq %rsp, %rdi
movq %rdi, %rsi
callq 0x28be
testb %al, %al
je 0x4fe6
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x28be
testb %al, %al
jne 0x5005
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x28be
testb %al, %al
jne 0x5024
leaq 0x4c(%rsp), %rdx
movl $0x3, (%rdx)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
movl $0x1, %ecx
callq 0x40e7
leaq 0x17f2(%rip), %rsi      # 0x6379
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x5043
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ba6
callq 0x2160
leaq 0x10(%rsp), %rbx
leaq 0x4c(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
movl $0x1, %ecx
callq 0x40e7
leaq 0x158a(%rip), %rsi      # 0x6153
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x5062
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4be8
callq 0x2160
movaps 0x1a41(%rip), %xmm0     # 0x6630
leaq 0x30(%rsp), %rdx
movaps %xmm0, (%rdx)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x2, %esi
movl $0x4, %ecx
callq 0x40e7
leaq 0x153e(%rip), %rsi      # 0x6153
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x5081
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4c34
callq 0x2160
leaq 0x10(%rsp), %rbx
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
movl $0x3, %esi
movl $0x4, %ecx
callq 0x40e7
leaq 0x14fc(%rip), %rsi      # 0x6153
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x50a0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x4c76
callq 0x2160
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1597(%rip), %rdi      # 0x6220
leaq 0x15af(%rip), %rsi      # 0x623f
leaq 0x15b5(%rip), %rcx      # 0x624c
movl $0xd, %edx
callq 0x20f0
leaq 0x15b1(%rip), %rdi      # 0x6259
leaq 0x1590(%rip), %rsi      # 0x623f
leaq 0x1596(%rip), %rcx      # 0x624c
movl $0xe, %edx
callq 0x20f0
leaq 0x15b4(%rip), %rdi      # 0x627b
leaq 0x1571(%rip), %rsi      # 0x623f
leaq 0x1577(%rip), %rcx      # 0x624c
movl $0xf, %edx
callq 0x20f0
leaq 0x15ba(%rip), %rdi      # 0x62a0
leaq 0x1552(%rip), %rsi      # 0x623f
leaq 0x1558(%rip), %rcx      # 0x624c
movl $0x10, %edx
callq 0x20f0
leaq 0x15c3(%rip), %rdi      # 0x62c8
leaq 0x1533(%rip), %rsi      # 0x623f
leaq 0x1539(%rip), %rcx      # 0x624c
movl $0x11, %edx
callq 0x20f0
leaq 0x15d0(%rip), %rdi      # 0x62f4
leaq 0x1514(%rip), %rsi      # 0x623f
leaq 0x151a(%rip), %rcx      # 0x624c
movl $0x12, %edx
callq 0x20f0
leaq 0x15e7(%rip), %rdi      # 0x632a
leaq 0x14f5(%rip), %rsi      # 0x623f
leaq 0x14fb(%rip), %rcx      # 0x624c
movl $0x13, %edx
callq 0x20f0
leaq 0x15f5(%rip), %rdi      # 0x6357
leaq 0x14d6(%rip), %rsi      # 0x623f
leaq 0x14dc(%rip), %rcx      # 0x624c
movl $0x16, %edx
callq 0x20f0
leaq 0x15fa(%rip), %rdi      # 0x637b
leaq 0x14b7(%rip), %rsi      # 0x623f
leaq 0x14bd(%rip), %rcx      # 0x624c
movl $0x17, %edx
callq 0x20f0
leaq 0x1601(%rip), %rdi      # 0x63a1
leaq 0x1498(%rip), %rsi      # 0x623f
leaq 0x149e(%rip), %rcx      # 0x624c
movl $0x18, %edx
callq 0x20f0
leaq 0x1617(%rip), %rdi      # 0x63d6
leaq 0x1479(%rip), %rsi      # 0x623f
leaq 0x147f(%rip), %rcx      # 0x624c
movl $0x19, %edx
callq 0x20f0
leaq 0x1633(%rip), %rdi      # 0x6411
leaq 0x145a(%rip), %rsi      # 0x623f
leaq 0x1460(%rip), %rcx      # 0x624c
movl $0x1a, %edx
callq 0x20f0
leaq 0x164f(%rip), %rdi      # 0x644c
leaq 0x143b(%rip), %rsi      # 0x623f
leaq 0x1441(%rip), %rcx      # 0x624c
movl $0x1b, %edx
callq 0x20f0
leaq 0x1665(%rip), %rdi      # 0x6481
leaq 0x141c(%rip), %rsi      # 0x623f
leaq 0x1422(%rip), %rcx      # 0x624c
movl $0x1e, %edx
callq 0x20f0
leaq 0x164e(%rip), %rdi      # 0x6489
leaq 0x13fd(%rip), %rsi      # 0x623f
leaq 0x1403(%rip), %rcx      # 0x624c
movl $0x1f, %edx
callq 0x20f0
leaq 0x163a(%rip), %rdi      # 0x6494
leaq 0x13de(%rip), %rsi      # 0x623f
leaq 0x13e4(%rip), %rcx      # 0x624c
movl $0x20, %edx
callq 0x20f0
leaq 0x1626(%rip), %rdi      # 0x649f
leaq 0x13bf(%rip), %rsi      # 0x623f
leaq 0x13c5(%rip), %rcx      # 0x624c
movl $0x21, %edx
callq 0x20f0
leaq 0x160f(%rip), %rdi      # 0x64a7
leaq 0x13a0(%rip), %rsi      # 0x623f
leaq 0x13a6(%rip), %rcx      # 0x624c
movl $0x22, %edx
callq 0x20f0
leaq 0x15fb(%rip), %rdi      # 0x64b2
leaq 0x1381(%rip), %rsi      # 0x623f
leaq 0x1387(%rip), %rcx      # 0x624c
movl $0x23, %edx
callq 0x20f0
leaq 0x15e7(%rip), %rdi      # 0x64bd
leaq 0x1362(%rip), %rsi      # 0x623f
leaq 0x1368(%rip), %rcx      # 0x624c
movl $0x24, %edx
callq 0x20f0
leaq 0x15d1(%rip), %rdi      # 0x64c6
leaq 0x1343(%rip), %rsi      # 0x623f
leaq 0x1349(%rip), %rcx      # 0x624c
movl $0x25, %edx
callq 0x20f0
leaq 0x15be(%rip), %rdi      # 0x64d2
leaq 0x1324(%rip), %rsi      # 0x623f
leaq 0x132a(%rip), %rcx      # 0x624c
movl $0x26, %edx
callq 0x20f0
leaq 0x15a8(%rip), %rdi      # 0x64db
leaq 0x1305(%rip), %rsi      # 0x623f
leaq 0x130b(%rip), %rcx      # 0x624c
movl $0x27, %edx
callq 0x20f0
leaq 0x1592(%rip), %rdi      # 0x64e4
leaq 0x12e6(%rip), %rsi      # 0x623f
leaq 0x12ec(%rip), %rcx      # 0x624c
movl $0x28, %edx
callq 0x20f0
leaq 0x157f(%rip), %rdi      # 0x64f0
leaq 0x12c7(%rip), %rsi      # 0x623f
leaq 0x12cd(%rip), %rcx      # 0x624c
movl $0x29, %edx
callq 0x20f0
leaq 0x1569(%rip), %rdi      # 0x64f9
leaq 0x12a8(%rip), %rsi      # 0x623f
leaq 0x12ae(%rip), %rcx      # 0x624c
movl $0x2a, %edx
callq 0x20f0
leaq 0x1553(%rip), %rdi      # 0x6502
leaq 0x1289(%rip), %rsi      # 0x623f
leaq 0x128f(%rip), %rcx      # 0x624c
movl $0x2b, %edx
callq 0x20f0
leaq 0x153d(%rip), %rdi      # 0x650b
leaq 0x126a(%rip), %rsi      # 0x623f
leaq 0x1270(%rip), %rcx      # 0x624c
movl $0x2c, %edx
callq 0x20f0
leaq 0x152a(%rip), %rdi      # 0x6517
leaq 0x124b(%rip), %rsi      # 0x623f
leaq 0x1251(%rip), %rcx      # 0x624c
movl $0x2d, %edx
callq 0x20f0
leaq 0x1514(%rip), %rdi      # 0x6520
leaq 0x122c(%rip), %rsi      # 0x623f
leaq 0x1232(%rip), %rcx      # 0x624c
movl $0x2e, %edx
callq 0x20f0
leaq 0x1501(%rip), %rdi      # 0x652c
leaq 0x120d(%rip), %rsi      # 0x623f
leaq 0x1213(%rip), %rcx      # 0x624c
movl $0x2f, %edx
callq 0x20f0
leaq 0x14ee(%rip), %rdi      # 0x6538
leaq 0x11ee(%rip), %rsi      # 0x623f
leaq 0x11f4(%rip), %rcx      # 0x624c
movl $0x33, %edx
callq 0x20f0
leaq 0x150a(%rip), %rdi      # 0x6573
leaq 0x11cf(%rip), %rsi      # 0x623f
leaq 0x11d5(%rip), %rcx      # 0x624c
movl $0x34, %edx
callq 0x20f0
leaq 0x1525(%rip), %rdi      # 0x65ad
leaq 0x11b0(%rip), %rsi      # 0x623f
leaq 0x11b6(%rip), %rcx      # 0x624c
movl $0x36, %edx
callq 0x20f0
leaq 0x1540(%rip), %rdi      # 0x65e7
leaq 0x1191(%rip), %rsi      # 0x623f
leaq 0x1197(%rip), %rcx      # 0x624c
movl $0x37, %edx
callq 0x20f0
jmp 0x50d7
jmp 0x50eb
jmp 0x50d7
jmp 0x50eb
jmp 0x50d7
jmp 0x50eb
jmp 0x50d7
jmp 0x50eb
jmp 0x50d7
jmp 0x50eb
jmp 0x50d7
jmp 0x50eb
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x50ee
callq 0x2160
jmp 0x50ee
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2260