// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_Util()
void Test::test_Util()
{
    setUpErrorMessage("test_Util() - failed");

    long long tmp = Util::getEffectiveTime();
    Util::sleep(1000);
    assertEquals(tmp + 1, Util::getEffectiveTime());

    assertEquals(0.0, Util::diff180(360.0, 360.0));
    //360=0 -> 170, diff = 170
    assertEquals(170.0, Util::diff180(170.0, 360.0));
    assertEquals(0.0, Util::diff180(0.0, 360.0));
    assertEquals(0.0, Util::diff180(-180.0, 180.0));
    //40 -> 90, diff = -50
    assertEquals(-50.0, Util::diff180(40.0, 90.0));
    //-20 -> 80 = -100
    assertEquals(-100.0, Util::diff180(-20.0, 80.0));

    StarData starData1;
    StarData starData2;

    starData1.az = 1;
    starData1.el = 2;
    starData1.ra = 3;
    starData1.dec = 4;
    starData1.time = 5;

    starData2.az = 1;
    starData2.el = 2;
    starData2.ra = 3;
    starData2.dec = 4;
    starData2.time = 5;

    assertTrue(!Util::goodAlignmentGeometry(starData1, starData2));

    starData1.az = 1;
    starData1.el = 2;
    starData1.ra = 3;
    starData1.dec = 4;
    starData1.time = 5;

    starData2.az = 1;
    starData2.el = 50;
    starData2.ra = 3;
    starData2.dec = 4;
    starData2.time = 5;

    assertTrue(!Util::goodAlignmentGeometry(starData1, starData2));


    starData1.az = 1;
    starData1.el = 2;
    starData1.ra = 3;
    starData1.dec = 4;
    starData1.time = 5;

    starData2.az = 100;
    starData2.el = 50;
    starData2.ra = 3;
    starData2.dec = 4;
    starData2.time = 5;

    assertTrue(Util::goodAlignmentGeometry(starData1, starData2));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x8902(%rip), %rsi      # 0x25d84
leaq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0x4ce2
leaq -0xa8(%rbp), %rsi
movq %rbx, %rdi
callq 0x1df6c
leaq -0xa8(%rbp), %rdi
callq 0x3100
callq 0x1efb8
movq %rax, %r14
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x1f018
incq %r14
callq 0x1efb8
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1e410
movsd 0x2b8b(%rip), %xmm0     # 0x20068
movaps %xmm0, %xmm1
callq 0x1ee44
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x8705(%rip), %xmm0     # 0x25c00
movsd 0x2b65(%rip), %xmm1     # 0x20068
callq 0x1ee44
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x86ea(%rip), %xmm0     # 0x25c00
callq 0x1e2a6
xorps %xmm0, %xmm0
movsd 0x2b42(%rip), %xmm1     # 0x20068
callq 0x1ee44
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x86c7(%rip), %xmm0     # 0x25c08
movsd 0x86c7(%rip), %xmm1     # 0x25c10
callq 0x1ee44
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x86b4(%rip), %xmm0     # 0x25c18
movsd 0x86b4(%rip), %xmm1     # 0x25c20
callq 0x1ee44
movaps %xmm0, %xmm1
movsd 0x86ac(%rip), %xmm0     # 0x25c28
movq %rbx, %rdi
callq 0x1e2a6
movsd 0x86a4(%rip), %xmm0     # 0x25c30
movsd 0x855c(%rip), %xmm1     # 0x25af0
callq 0x1ee44
movaps %xmm0, %xmm1
movsd 0x8694(%rip), %xmm0     # 0x25c38
movq %rbx, %rdi
callq 0x1e2a6
leaq -0x58(%rbp), %rdi
callq 0x1bb80
leaq -0x88(%rbp), %rdi
callq 0x1bb80
movabsq $0x3ff0000000000000, %r13 # imm = 0x3FF0000000000000
leaq -0x58(%rbp), %rdi
movq %r13, 0x8(%rdi)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x10(%rdi)
movabsq $0x4008000000000000, %r14 # imm = 0x4008000000000000
movq %r14, 0x18(%rdi)
movabsq $0x4010000000000000, %r15 # imm = 0x4010000000000000
movq %r15, 0x20(%rdi)
movabsq $0x4014000000000000, %r12 # imm = 0x4014000000000000
movq %r12, 0x28(%rdi)
leaq -0x88(%rbp), %rsi
movq %r13, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movq %r14, 0x18(%rsi)
movq %r15, 0x20(%rsi)
movq %r12, 0x28(%rsi)
callq 0x1ef3a
xorb $0x1, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x1e196
leaq -0x58(%rbp), %rdi
movq %r13, 0x8(%rdi)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x10(%rdi)
movq %r14, 0x18(%rdi)
movq %r15, 0x20(%rdi)
movq %r12, 0x28(%rdi)
leaq -0x88(%rbp), %rsi
movq %r13, 0x8(%rsi)
movabsq $0x4049000000000000, %rax # imm = 0x4049000000000000
movq %rax, 0x10(%rsi)
movq %r14, 0x18(%rsi)
movq %r15, 0x20(%rsi)
movq %r12, 0x28(%rsi)
callq 0x1ef3a
xorb $0x1, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x1e196
leaq -0x58(%rbp), %rdi
movq %r13, 0x8(%rdi)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x10(%rdi)
movq %r14, 0x18(%rdi)
movq %r15, 0x20(%rdi)
movq %r12, 0x28(%rdi)
movabsq $0x4059000000000000, %rax # imm = 0x4059000000000000
leaq -0x88(%rbp), %rsi
movq %rax, 0x8(%rsi)
movabsq $0x4049000000000000, %rax # imm = 0x4049000000000000
movq %rax, 0x10(%rsi)
movq %r14, 0x18(%rsi)
movq %r15, 0x20(%rsi)
movq %r12, 0x28(%rsi)
callq 0x1ef3a
movzbl %al, %esi
movq %rbx, %rdi
callq 0x1e196
leaq -0x88(%rbp), %rdi
callq 0x1bba6
leaq -0x58(%rbp), %rdi
callq 0x1bba6
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1d743
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x3100
jmp 0x1d74c
movq %rax, %rbx
jmp 0x1d74c
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x1bba6
leaq -0x58(%rbp), %rdi
callq 0x1bba6
movq %rbx, %rdi
callq 0x34a0