LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Data.cpp
// Function: Data::calculateTargetAzEl()
void Data::calculateTargetAzEl()
{
    targetAz = NAN;
    targetEl = NAN;

    // If we have valid alignment data,
    // recalculate everything based on the current position and time,
    // and update the form's result fields.

    if(isAligned() && finite(targetRA) && finite(targetDec))
    {
        calc.EqToAzEl(targetRA, targetDec, Util::getEffectiveTime(),
	      false, &targetAz, &targetEl);

        setTargetAzEl(targetAz, targetEl);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x338(%rdi)
movq %rax, 0x340(%rdi)
cmpb $0x1, 0x320(%rdi)
jne 0x5307
movq %rdi, %rbx
movq 0x328(%rdi), %xmm0
movq %xmm0, %rcx
btrq $0x3f, %rcx
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rax, %rcx
jg 0x5307
movq 0x330(%rbx), %xmm1
movq %xmm1, %rcx
btrq $0x3f, %rcx
cmpq %rax, %rcx
jle 0x5312
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x338(%rbx), %r14
leaq 0x340(%rbx), %r15
addq $0x10, %rbx
movq %xmm0, -0x20(%rbp)
movq %xmm1, -0x28(%rbp)
callq 0x2b30a
cvtsi2sd %rax, %xmm2
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4bfc
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Data.cpp
// Function: Data::CalculateAzElError(double*, double*)
void Data::CalculateAzElError(double *azPtr, double *elPtr)
{
    double azErr, elErr;

    if (finite(curAz) &&
        finite(curEl) &&
        finite(targetAz) &&
        finite(targetEl)) {

            azErr = Util::diff180(targetAz, curAz);
            elErr = Util::diff180(targetEl, curEl);

      } else {

            azErr = NAN;
            elErr = NAN;
      }

    //If pointers are not NULL, affect them
    if (azPtr)
    {
        *azPtr = azErr;
    }
    if (elPtr)
    {
        *elPtr = elErr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x378(%rdi), %xmm1
movq %xmm1, %rcx
btrq $0x3f, %rcx
movsd 0x26e02(%rip), %xmm3    # 0x2c188
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rax, %rcx
jg 0x53c9
movq %rdi, %r15
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq 0x380(%rdi), %rdx
andq %rcx, %rdx
cmpq %rax, %rdx
jg 0x53c9
movq 0x338(%r15), %xmm2
movq %xmm2, %rdx
btrq $0x3f, %rdx
cmpq %rax, %rdx
jle 0x53ea
movaps %xmm3, %xmm0
testq %r14, %r14
je 0x53d6
movsd %xmm3, (%r14)
testq %rbx, %rbx
je 0x53df
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
andq 0x340(%r15), %rcx
movaps %xmm3, %xmm0
cmpq %rax, %rcx
jg 0x53cc
movdqa %xmm2, %xmm0
callq 0x2b148
movq %xmm0, -0x20(%rbp)
movsd 0x340(%r15), %xmm0
movq 0x380(%r15), %xmm1
callq 0x2b148
movsd -0x20(%rbp), %xmm3
jmp 0x53cc
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/./StarData.h
// Function: starDataNamespace::validStarData(StarData&)
static bool validStarData(StarData& sd)
    {
      return (  MathLib::finite(sd.ra) &&
                MathLib::finite(sd.dec) &&
                MathLib::finite(sd.az) &&
                MathLib::finite(sd.el) &&
                sd.time >= 0.0 &&
                sd.ra >= 0.0);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0x18(%rdi), %xmm0
callq 0x59a8
testl %eax, %eax
je 0x5487
movsd 0x20(%rbx), %xmm0
callq 0x59a8
testl %eax, %eax
je 0x5487
movsd 0x8(%rbx), %xmm0
callq 0x59a8
testl %eax, %eax
je 0x5487
movsd 0x10(%rbx), %xmm0
callq 0x59a8
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x5489
movsd 0x28(%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x5489
movsd 0x18(%rbx), %xmm1
ucomisd %xmm0, %xmm1
setae %al
jmp 0x5489
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Encoder.cpp
// Function: Encoder::setup_encoder()
void Encoder::setup_encoder()
{
    register_to_callback();

    value = 0;
    last_encoded = 0;

    pinMode(pin_a, INPUT);
    pinMode(pin_b, INPUT);
    pullUpDnControl(pin_a, PUD_UP);
    pullUpDnControl(pin_b, PUD_UP);
    wiringPiISR(pin_a, INT_EDGE_BOTH, call_back_encoder_ptr);
    wiringPiISR(pin_b, INT_EDGE_BOTH, call_back_encoder_ptr);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xda(%rip), %rax        # 0x565c
movq %rax, 0x18(%rdi)
leaq -0x10(%rbp), %rsi
movq %rdi, (%rsi)
leaq 0x34d6c(%rip), %rdi     # 0x3a300
callq 0x56ae
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Encoder.cpp
// Function: Encoder::update_encoder()
void Encoder::update_encoder()
{
    int MSB = digitalRead(pin_a);
    int LSB = digitalRead(pin_b);

    int encoded = (MSB << 1) | LSB;
    int sum = (last_encoded << 2) | encoded;

    if(sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011)
    {
        value++;
    }

    if(sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000)
    {
        value--;
    }

    last_encoded = encoded;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x34d58(%rip), %eax     # 0x3a318
leal 0x1(%rax), %ecx
leal 0x2(%rax), %edx
movl %edx, 0x34d4c(%rip)     # 0x3a318
addl %eax, %eax
orl %ecx, %eax
movl 0x10(%rdi), %ecx
shll $0x2, %ecx
orl %eax, %ecx
cmpl $0xe, %ecx
ja 0x55f5
movl $0x2814, %edx           # imm = 0x2814
btl %ecx, %edx
jb 0x55fa
movl $0x4182, %edx           # imm = 0x4182
btl %ecx, %edx
jae 0x55f5
decq 0x8(%rdi)
movl %eax, 0x10(%rdi)
popq %rbp
retq
incq 0x8(%rdi)
addl $-0x7, %ecx
cmpl $0x1, %ecx
jbe 0x55f1
jmp 0x55f5
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::run_all()
void Test::run_all()
{
    try
    {
        //test_Thread();
        test_StarData();
        test_StarDataNamespaceFunctions();
        test_MathLib_trigonometric();
        test_MathLib_exponential_logarithmic();
        test_MathLib_hyperbolic();
        test_power();
        test_nearest_absolute_remainder();
        test_miscellaneous();
        test_Util();
        test_Encoder();
        test_Data();
        test_Object();
    }
    catch(const std::exception& fail)
    {
        std::cerr << fail.what() << std::endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x26960
movq %rbx, %rdi
callq 0x26baa
movq %rbx, %rdi
callq 0x26d62
movq %rbx, %rdi
callq 0x27238
movq %rbx, %rdi
callq 0x27672
movq %rbx, %rdi
callq 0x27884
movq %rbx, %rdi
callq 0x27a8a
movq %rbx, %rdi
callq 0x27bda
movq %rbx, %rdi
callq 0x2829e
movq %rbx, %rdi
callq 0x285a2
movq %rbx, %rdi
callq 0x28728
movq %rbx, %rdi
callq 0x28a8e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x26950
movq %rbx, %rdi
callq 0x3100
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x136bb(%rip), %rdi     # 0x39fe8
movq %rax, %rsi
callq 0x32c0
movq %rax, %rdi
callq 0x3120
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3420
movq %rax, %rbx
callq 0x3420
movq %rbx, %rdi
callq 0x34b0
movq %rax, %rdi
callq 0x26334
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_StarDataNamespaceFunctions()
void Test::test_StarDataNamespaceFunctions()
{
    setUpErrorMessage("test_StarDataNamespaceFunctions() - failed");

    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(starDataNamespace::validStarData(starData1));
    assertTrue(starDataNamespace::validStarData(starData2));

    assertTrue(starDataNamespace::validAlignementData(starData1, starData2));

    starDataNamespace::clearAlignmentData(starData1, starData2);

    assertTrue(!starDataNamespace::validAlignementData(starData1, starData2));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xb094(%rip), %rsi      # 0x31c60
leaq 0xb0b7(%rip), %rdx      # 0x31c8a
leaq -0x68(%rbp), %r14
movq %r14, %rdi
callq 0x4f28
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f78
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x26bff
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x32e0
leaq -0x98(%rbp), %rdi
callq 0x26850
leaq -0x48(%rbp), %rdi
callq 0x26850
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq -0x98(%rbp), %rdi
movq %rax, 0x8(%rdi)
movabsq $0x4000000000000000, %rcx # imm = 0x4000000000000000
movq %rcx, 0x10(%rdi)
movabsq $0x4008000000000000, %rdx # imm = 0x4008000000000000
movq %rdx, 0x18(%rdi)
movabsq $0x4010000000000000, %rsi # imm = 0x4010000000000000
movq %rsi, 0x20(%rdi)
movabsq $0x4014000000000000, %r8 # imm = 0x4014000000000000
movq %r8, 0x28(%rdi)
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq %rsi, -0x28(%rbp)
movq %r8, -0x20(%rbp)
callq 0x28cad
movzbl %al, %esi
movq %rbx, %rdi
callq 0x2930a
leaq -0x48(%rbp), %rdi
callq 0x28cad
movzbl %al, %esi
movq %rbx, %rdi
callq 0x2930a
leaq -0x98(%rbp), %rdi
callq 0x28cad
testb %al, %al
je 0x26cb4
leaq -0x48(%rbp), %rdi
callq 0x28cad
jmp 0x26cb6
xorl %eax, %eax
movzbl %al, %esi
movq %rbx, %rdi
callq 0x2930a
leaq -0x98(%rbp), %rdi
callq 0x2687e
leaq -0x48(%rbp), %rdi
callq 0x2687e
leaq -0x98(%rbp), %rdi
callq 0x28cad
testb %al, %al
je 0x26cf1
leaq -0x48(%rbp), %rdi
callq 0x28cad
jmp 0x26cf3
xorl %eax, %eax
xorb $0x1, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x2930a
leaq -0x48(%rbp), %rdi
callq 0x26878
leaq -0x98(%rbp), %rdi
callq 0x26878
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x26d4e
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x26d5a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x32e0
jmp 0x26d5a
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x26878
leaq -0x98(%rbp), %rdi
callq 0x26878
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_power()
void Test::test_power()
{
    setUpErrorMessage("test_power() - failed");

    assertEquals(8.0, MathLib::pow(2, 3));
    assertEquals(0.001, MathLib::pow(0.1, 3));
    assertEquals(10000.0, MathLib::pow(10, 4));

    assertEquals(25.0, MathLib::sqrt(625));
    assertEquals(11.0, MathLib::sqrt(121));
    assertEquals(3.0, MathLib::sqrt(9));
    assertEquals(11.09053, MathLib::sqrt(123));

    //hypotenuse of the right triangle
    assertEquals(5.0, MathLib::hypot(3,4));
    assertEquals(6.40312, MathLib::hypot(4,5));

    assertEquals(2.0, MathLib::cbrt(8.0));
    assertEquals(5.0, MathLib::cbrt(125.0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xa482(%rip), %rsi      # 0x31d25
leaq 0xa490(%rip), %rdx      # 0x31d3a
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x4f28
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f78
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x278d6
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
movsd 0xa17a(%rip), %xmm0     # 0x31a58
movsd 0xa17a(%rip), %xmm1     # 0x31a60
callq 0x5916
movaps %xmm0, %xmm1
movsd 0x4eba(%rip), %xmm0     # 0x2c7b0
movq %rbx, %rdi
callq 0x29578
movsd 0xa21a(%rip), %xmm0     # 0x31b20
movsd 0xa152(%rip), %xmm1     # 0x31a60
callq 0x5916
movaps %xmm0, %xmm1
movsd 0xa20a(%rip), %xmm0     # 0x31b28
movq %rbx, %rdi
callq 0x29578
movsd 0x5c02(%rip), %xmm0     # 0x2d530
movsd 0xa132(%rip), %xmm1     # 0x31a68
callq 0x5916
movaps %xmm0, %xmm1
movsd 0xa1ea(%rip), %xmm0     # 0x31b30
movq %rbx, %rdi
callq 0x29578
movsd 0xa1e2(%rip), %xmm0     # 0x31b38
callq 0x5920
movaps %xmm0, %xmm1
movsd 0xa1da(%rip), %xmm0     # 0x31b40
movq %rbx, %rdi
callq 0x29578
movsd 0xa1d2(%rip), %xmm0     # 0x31b48
callq 0x5920
movaps %xmm0, %xmm1
movsd 0xa1ca(%rip), %xmm0     # 0x31b50
movq %rbx, %rdi
callq 0x29578
movsd 0xa1c2(%rip), %xmm0     # 0x31b58
callq 0x5920
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa0b7(%rip), %xmm0     # 0x31a60
callq 0x29578
movsd 0xa1aa(%rip), %xmm0     # 0x31b60
callq 0x5920
movaps %xmm0, %xmm1
movsd 0xa1a2(%rip), %xmm0     # 0x31b68
movq %rbx, %rdi
callq 0x29578
movsd 0xa08a(%rip), %xmm0     # 0x31a60
movsd 0xa08a(%rip), %xmm1     # 0x31a68
callq 0x593a
movaps %xmm0, %xmm1
movsd 0xa082(%rip), %xmm0     # 0x31a70
movq %rbx, %rdi
callq 0x29578
movsd 0xa06a(%rip), %xmm0     # 0x31a68
movsd 0xa06a(%rip), %xmm1     # 0x31a70
callq 0x593a
movaps %xmm0, %xmm1
movsd 0xa15a(%rip), %xmm0     # 0x31b70
movq %rbx, %rdi
callq 0x29578
movsd 0x4d8a(%rip), %xmm0     # 0x2c7b0
callq 0x5950
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa01f(%rip), %xmm0     # 0x31a58
callq 0x29578
movsd 0xa132(%rip), %xmm0     # 0x31b78
callq 0x5950
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0xa017(%rip), %xmm0     # 0x31a70
callq 0x29578
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x27a81
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_nearest_absolute_remainder()
void Test::test_nearest_absolute_remainder()
{
    setUpErrorMessage("test_nearest_absolute_remainder() - failed");

    //next nearest integer
    assertEquals(4.0, MathLib::ceil(pi));
    assertEquals(3.0, MathLib::ceil(2.987));

    assertEquals(3.0, MathLib::fabs(-3.0));
    assertEquals(3.0, MathLib::fabs(3.0));

    //previous nearest integer
    assertEquals(3.0, MathLib::floor(pi));
    assertEquals(2.0, MathLib::floor(2.987));

    assertEquals(36.0, fmod(4587, 123));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xa292(%rip), %rsi      # 0x31d3b
leaq 0xa2b5(%rip), %rdx      # 0x31d65
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x4f28
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f78
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x27adc
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
movsd 0x4544(%rip), %xmm0     # 0x2c028
callq 0x595a
movaps %xmm0, %xmm1
movsd 0x9f74(%rip), %xmm0     # 0x31a68
movq %rbx, %rdi
callq 0x29578
movsd 0xa07c(%rip), %xmm0     # 0x31b80
callq 0x595a
movaps %xmm0, %xmm1
movsd 0x9f4c(%rip), %xmm0     # 0x31a60
movq %rbx, %rdi
callq 0x29578
movsd 0x5a3c(%rip), %xmm0     # 0x2d560
callq 0x5964
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9f29(%rip), %xmm0     # 0x31a60
callq 0x29578
movsd 0x9f1c(%rip), %xmm0     # 0x31a60
callq 0x5964
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9f09(%rip), %xmm0     # 0x31a60
callq 0x29578
movsd 0x44c4(%rip), %xmm0     # 0x2c028
callq 0x5972
movaps %xmm0, %xmm1
movq %rbx, %rdi
movsd 0x9ee9(%rip), %xmm0     # 0x31a60
callq 0x29578
movsd 0x9ffc(%rip), %xmm0     # 0x31b80
callq 0x5972
movaps %xmm0, %xmm1
movsd 0x9ec4(%rip), %xmm0     # 0x31a58
movq %rbx, %rdi
callq 0x29578
movsd 0x9fe4(%rip), %xmm0     # 0x31b88
movq %rbx, %rdi
movaps %xmm0, %xmm1
callq 0x29578
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x27bd2
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_Encoder()
void Test::test_Encoder()
{
    setUpErrorMessage("test_Encoder() - failed");

    Encoder encoder(23, 24);
    assertEquals(23, encoder.pin_a);
    assertEquals(24, encoder.pin_b);

    assertEquals(1, Encoder::_encoders_ptr.size());

    Encoder encoder2(21, 22);
    assertEquals(21, encoder2.pin_a);
    assertEquals(22, encoder2.pin_b);

    assertEquals(2, Encoder::_encoders_ptr.size());

    encoderNameSpace::_callback();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x97d8(%rip), %rsi      # 0x31d99
leaq 0x97e8(%rip), %rdx      # 0x31db0
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x4f28
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f78
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x285f4
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
leaq -0x78(%rbp), %r14
movq %r14, %rdi
movl $0x17, %esi
movl $0x18, %edx
callq 0x5530
movl (%r14), %edx
movq %rbx, %rdi
movl $0x17, %esi
callq 0x29d9a
movl -0x74(%rbp), %edx
movq %rbx, %rdi
movl $0x18, %esi
callq 0x29d9a
leaq 0x11ccf(%rip), %r14     # 0x3a300
movq 0x8(%r14), %rdx
subq (%r14), %rdx
shrq $0x3, %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq 0x29d9a
leaq -0x58(%rbp), %rdi
movl $0x15, %esi
movl $0x16, %edx
callq 0x5530
movl -0x58(%rbp), %edx
movq %rbx, %rdi
movl $0x15, %esi
callq 0x29d9a
movl -0x54(%rbp), %edx
movq %rbx, %rdi
movl $0x16, %esi
callq 0x29d9a
movq 0x8(%r14), %rdx
subq (%r14), %rdx
shrq $0x3, %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x29d9a
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
testl %ecx, %ecx
jle 0x286ca
xorl %ebx, %ebx
movq (%rax,%rbx,8), %rdi
callq 0x55b6
incq %rbx
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movslq %ecx, %rcx
cmpq %rcx, %rbx
jl 0x286a8
leaq -0x58(%rbp), %rdi
callq 0x55b0
leaq -0x78(%rbp), %rdi
callq 0x55b0
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28705
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x2871f
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
jmp 0x2871f
jmp 0x2870a
movq %rax, %rbx
jmp 0x28716
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x55b0
leaq -0x78(%rbp), %rdi
callq 0x55b0
movq %rbx, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_Object()
void Test::test_Object()
{
    setUpErrorMessage("test_Object() - failed");

    Object object("dsfds", 22, 22, "dsq");

    Object::fill();
    assertEquals(485, Object::_objects_ptr.size());
    assertEquals(485, Object::_objects_ptr.size());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq -0x68(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x934d(%rip), %rsi      # 0x31dfd
leaq 0x935c(%rip), %rdx      # 0x31e13
leaq -0x78(%rbp), %r14
movq %r14, %rdi
callq 0x4f28
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f78
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x28ae3
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x32e0
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x9322(%rip), %rsi      # 0x31e14
leaq 0x9320(%rip), %rdx      # 0x31e19
leaq -0x58(%rbp), %rdi
callq 0x4f28
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x9309(%rip), %rsi      # 0x31e1a
leaq 0x9305(%rip), %rdx      # 0x31e1d
leaq -0x38(%rbp), %rdi
callq 0x4f28
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movsd 0x911c(%rip), %xmm0     # 0x31c50
leaq -0x38(%rbp), %rdx
movaps %xmm0, %xmm1
callq 0x5a50
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x28b55
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x28b6a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x32e0
callq 0x5c24
leaq 0x117b2(%rip), %r14     # 0x3a328
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x4, %rax
imull $0xcccccccd, %eax, %edx # imm = 0xCCCCCCCD
movq %rbx, %rdi
movl $0x1e5, %esi            # imm = 0x1E5
callq 0x29d9a
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x4, %rax
imull $0xcccccccd, %eax, %edx # imm = 0xCCCCCCCD
movq %rbx, %rdi
movl $0x1e5, %esi            # imm = 0x1E5
callq 0x29d9a
leaq -0xc8(%rbp), %rdi
callq 0x5ae4
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x28be9
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x32e0
jmp 0x28be9
movq %rax, %rbx
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x28c26
movq -0x48(%rbp), %rsi
jmp 0x28c0d
movq %rax, %rbx
jmp 0x28c26
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r15, %rdi
je 0x28c26
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x32e0
jmp 0x28c26
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x5ae4
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Test.cpp
// Function: Test::test_Thread()
void Test::test_Thread()
{
    Thread * t = new ThreadEncoderReader();
    Thread * t2  = new ThreadTargetCalculator();
    t->start();
    t2->start();
    t->join();
    t2->join();
    delete(t);
    delete(t2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x10, %edi
callq 0x32d0
movq %rax, %rbx
xorl %r15d, %r15d
movq %r15, 0x8(%rax)
leaq 0x11085(%rip), %rax     # 0x39cd8
movq %rax, (%rbx)
movl $0x10, %edi
callq 0x32d0
movq %rax, %r14
movq %r15, 0x8(%rax)
leaq 0x110ba(%rip), %rax     # 0x39d28
movq %rax, (%r14)
movq %rbx, %rdi
callq 0x28d26
movq %r14, %rdi
callq 0x28d26
movq %rbx, %rdi
callq 0x28dc8
movq %r14, %rdi
callq 0x28dc8
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq (%r14), %rax
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/./Thread.h
// Function: Thread::start()
void start()
    {
        if (m_threadbase_ptr == NULL) {
            m_threadbase_ptr = new pthread_t;
            int rc = pthread_create(m_threadbase_ptr, NULL, threadbase_dispatcher, this);
            if (rc != 0) {
                throw std::runtime_error("threadbase pthread_create failed");
            }
        } else {
            throw std::runtime_error("multiple threadbase start");
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x8(%rdi)
jne 0x28d62
movq %rdi, %rbx
movl $0x8, %edi
callq 0x32d0
movq %rax, 0x8(%rbx)
leaq -0x34(%rip), %rdx       # 0x28d18
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x3500
testl %eax, %eax
jne 0x28d80
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x3130
movq %rax, %rbx
leaq 0x90e7(%rip), %rsi      # 0x31e5d
movq %rax, %rdi
callq 0x30f0
jmp 0x28d9c
movl $0x10, %edi
callq 0x3130
movq %rax, %rbx
leaq 0x90a8(%rip), %rsi      # 0x31e3c
movq %rax, %rdi
callq 0x30f0
movq 0x1124d(%rip), %rsi     # 0x39ff0
movq 0x11216(%rip), %rdx     # 0x39fc0
movq %rbx, %rdi
callq 0x3460
jmp 0x28db4
movq %rax, %r14
movq %rbx, %rdi
callq 0x31e0
movq %r14, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/./Thread.h
// Function: Thread::join()
void join()
    {
        if (m_threadbase_ptr) {
            int rc = pthread_join(*m_threadbase_ptr, NULL);
            if (rc != 0) {
                throw std::runtime_error("threadbase pthread_join failed");
            }
            delete m_threadbase_ptr;
            m_threadbase_ptr = NULL;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x28dff
movq %rdi, %rbx
movq (%rax), %rdi
xorl %esi, %esi
callq 0x3270
testl %eax, %eax
jne 0x28e04
movq 0x8(%rbx), %rdi
movl $0x8, %esi
callq 0x32e0
movq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x3130
movq %rax, %rbx
leaq 0x905f(%rip), %rsi      # 0x31e77
movq %rax, %rdi
callq 0x30f0
movq 0x111c9(%rip), %rsi     # 0x39ff0
movq 0x11192(%rip), %rdx     # 0x39fc0
movq %rbx, %rdi
callq 0x3460
movq %rax, %r14
movq %rbx, %rdi
callq 0x31e0
movq %r14, %rdi
callq 0x34b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/./ThreadEncoderReader.h
// Function: ThreadEncoderReader::run()
virtual void run()
    {
        long u = 100000000;
        double elapsedTime = 0.0;

        struct timeval t1;
        gettimeofday(&t1, NULL);

        struct timeval t2;

        while(u > 0)
        {
            u--;
        }
        gettimeofday(&t2, NULL);

        elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0;      // sec to ms
        elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0;   // us to ms
        std::cout << elapsedTime << " ms.\n" << std::endl;

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3400
leaq -0x20(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3400
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq (%rbx), %rax
cvtsi2sd %rax, %xmm1
movsd 0x8dc0(%rip), %xmm2     # 0x31c58
mulsd %xmm2, %xmm1
subq 0x8(%rbx), %rcx
cvtsi2sd %rcx, %xmm0
divsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x11114(%rip), %rdi     # 0x39fc8
callq 0x33f0
movq %rax, %rbx
leaq 0x8f5b(%rip), %rsi      # 0x31e1e
movl $0x5, %edx
movq %rax, %rdi
callq 0x3310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x31b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/./ThreadTargetCalculator.h
// Function: ThreadTargetCalculator::run()
virtual void run()
    {
        long long k = 0;
        long long a = 0;
        while(true)
        {
            k = 0;
            for(int i=0;i<10000;i++)
            {
                k+=i;
            }
            k=0;
            a++;
            if(a > 10000)
            {
                std::cout << "hello I'm still here..." << std::endl;
                a = 0;
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %eax, %eax
movq 0x110a2(%rip), %rbx     # 0x39fc8
leaq 0x8ef7(%rip), %r14      # 0x31e24
leaq 0x1(%rax), %rcx
cmpq $0x2710, %rax           # imm = 0x2710
movq %rcx, %rax
jl 0x28f2d
movl $0x17, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31b0
xorl %eax, %eax
jmp 0x28f2d
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Utils.cpp
// Function: Util::diff180(double, double)
double Util::diff180(double a, double b)
{
  double diff = a - b;

  while (diff <= -180.0)
  {
    diff += 360.0;
  }

  while (diff > 180.0)
  {
    diff -= 360.0;
  }

  return diff;
}

// Assembly:
subsd %xmm1, %xmm0
movsd 0x6ab4(%rip), %xmm1     # 0x31c08
ucomisd %xmm0, %xmm1
jb 0x2b16c
movsd 0xf06(%rip), %xmm2      # 0x2c068
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
jae 0x2b162
pushq %rbp
movq %rsp, %rbp
ucomisd 0x6a98(%rip), %xmm0     # 0x31c10
jbe 0x2b194
movsd 0x6dae(%rip), %xmm1     # 0x31f30
movsd 0x6a86(%rip), %xmm2     # 0x31c10
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
ja 0x2b18a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Utils.cpp
// Function: Util::crudeCalcSeparation(double, double, double, double)
unsigned int Util::crudeCalcSeparation(double az1, double el1, double az2, double el2)
{
    double cossep;

    az1 *= radPerDeg;
    el1 *= radPerDeg;
    az2 *= radPerDeg;
    el2 *= radPerDeg;

    cossep = (MathLib::sin(el1)*MathLib::sin(el2)) + (MathLib::cos(el1)*MathLib::cos(el2)*MathLib::cos(az1-az2));

    return (unsigned int)(20000.0*(1.0-cossep));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movapd %xmm1, %xmm4
movsd 0xeb6(%rip), %xmm1      # 0x2c060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm4
movsd %xmm4, -0x10(%rbp)
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
movsd %xmm0, -0x20(%rbp)
mulsd %xmm3, %xmm1
movsd %xmm1, -0x8(%rbp)
movapd %xmm4, %xmm0
callq 0x5862
movsd %xmm0, -0x28(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x5862
movsd %xmm0, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x5858
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x5858
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x5858
mulsd -0x8(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
mulsd -0x28(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd 0xdde(%rip), %xmm0      # 0x2c010
subsd %xmm1, %xmm0
mulsd 0x6cfa(%rip), %xmm0     # 0x31f38
cvttsd2si %xmm0, %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/Utils.cpp
// Function: Util::goodAlignmentGeometry(StarData&, StarData&)
bool Util::goodAlignmentGeometry(StarData& starData1, StarData& starData2)
{
    unsigned int crudeSep, minCrudeSep;
    double azDiff;

    // Reject alignments with insufficient separation in azimuth, even if the
    // elevations are quite different.

    azDiff = diff180(starData1.az, starData2.az);

    if (fabs(azDiff) < 5.0)
    {
        return false;
    }

    // Also make sure the recorded az/el positions are not identical
    // or very close to each other.
    minCrudeSep = crudeCalcSeparation(0.0, 0.0, 0.0, 5.0);  // 5.0 degree min sep

    crudeSep = crudeCalcSeparation(starData1.az, starData1.el, starData2.az, starData2.az);

    if (crudeSep < minCrudeSep)
    {
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x8(%rdi), %xmm0
subsd 0x8(%rsi), %xmm0
movsd 0x699c(%rip), %xmm1     # 0x31c08
ucomisd %xmm0, %xmm1
jb 0x2b284
movsd 0xdee(%rip), %xmm2      # 0x2c068
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
jae 0x2b27a
ucomisd 0x6984(%rip), %xmm0     # 0x31c10
jbe 0x2b2a8
movsd 0x6c9a(%rip), %xmm1     # 0x31f30
movsd 0x6972(%rip), %xmm2     # 0x31c10
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
ja 0x2b29e
andpd 0xf10(%rip), %xmm0      # 0x2c1c0
movsd 0x67b8(%rip), %xmm1     # 0x31a70
ucomisd %xmm0, %xmm1
jbe 0x2b2c2
xorl %eax, %eax
jmp 0x2b2fe
movsd 0x67a6(%rip), %xmm3     # 0x31a70
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x2b196
movl %eax, %r15d
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
movsd 0x8(%rbx), %xmm2
movapd %xmm2, %xmm3
callq 0x2b196
cmpl %r15d, %eax
setae %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/philipperemy[P]digital-setting-circles/main.cpp
// Function: main
int main()
{
    Test test;
    test.run_all();

  /*  Encoder encoder_1(23, 24);
    Encoder encoder_2(21, 22);

    encoderNameSpace::_callback();

    StarData starData;
    cout << "validate star data = " << starDataNamespace::validStarData(starData) << endl;

    Calc c;
    double ra = 0;
    double *raptr = &ra;
    double dec = 0;
    double *decptr = &dec;

    c.setAlignmentData(0, 200, 323, 123, 233, 2000000);
    c.setAlignmentData(1, 201, 324, 124, 234, 2000001);
    c.finalizeAlignment(false);
    c.AzElToEq(201, 122, 2000002, raptr, decptr);
    cout << "ra " << *raptr << endl;
    cout << "dec " << *decptr << endl;
    cout << "Hello world!" << endl;

    return 0;*/

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq -0x30(%rbp), %rdi
callq 0x268a0
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b3c5
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x32e0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x2b3e8
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
callq 0x34b0
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: parameter_value::parameter_value(int, char**)
parameter_value::parameter_value(int argc, char ** argv){
		trace_filename = new char[100]; 		 
		synthetic = false; 

		strcpy(filename, argv[1]);
		load_parameters(argv[1]);
	
		load_inline_parameters(argc, argv);
	
		if (synthetic) {	
			sprintf(trace_filename, "trace_%.1f_%d_%d_%d", syn_rd_ratio , 
							syn_req_size , syn_req_count ,
							syn_interarrival_mean);
		}
	
		// distribute luns between channels
		for (int i = 0; i < channel_number; i++){
				lun_channel[i] = 0;
		}
		int channel = 0;
		for (int i = 0; i < lun_num; i++){
				lun_channel[channel]++;
				channel = (channel + 1) % channel_number;
		}

		channel = 0;
		for (int i = 0; i < channel_number; i++){
				if (lun_channel[i] != 0){
						channel++;
				}
		}
		channel_number = channel;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl $0x64, %edi
callq 0x2040
movq %rax, 0x340(%rbx)
movb $0x0, 0x348(%rbx)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x2130
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x25ee
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x36ae
cmpb $0x1, 0x348(%rbx)
jne 0x256e
cvtss2sd 0x324(%rbx), %xmm0
movq 0x340(%rbx), %rdi
movl 0x328(%rbx), %ecx
movl 0x32c(%rbx), %edx
movl 0x330(%rbx), %r8d
leaq 0x7bcd(%rip), %rsi      # 0xa134
movb $0x1, %al
callq 0x2080
movl 0x98(%rbx), %r14d
testq %r14, %r14
je 0x2590
leaq 0x9c(%rbx), %rdi
leaq (,%r14,4), %rdx
xorl %esi, %esi
callq 0x20d0
cmpl $0x0, 0x88(%rbx)
je 0x25bf
xorl %ecx, %ecx
xorl %edx, %edx
movslq %edx, %rax
incl 0x9c(%rbx,%rax,4)
incl %eax
movl 0x98(%rbx), %r14d
xorl %edx, %edx
divl %r14d
incl %ecx
cmpl 0x88(%rbx), %ecx
jb 0x259d
testl %r14d, %r14d
je 0x25e0
movl %r14d, %eax
xorl %edx, %edx
xorl %ecx, %ecx
cmpl $0x1, 0x9c(%rbx,%rdx,4)
sbbl $-0x1, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x25cb
jmp 0x25e2
xorl %ecx, %ecx
movl %ecx, 0x98(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: parameter_value::print_all_parameters(_IO_FILE*)
void parameter_value::print_all_parameters(FILE * stat_file){
		FILE * fp = fopen(filename, "r");
		char buffer[300];
		while (fgets(buffer, 300, fp)){
				fprintf(stat_file, "%s", buffer);
				fflush(stat_file);
		}
		fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rsi, %rbx
leaq 0x67d9(%rip), %rsi      # 0xa22d
callq 0x2200
movq %rax, %r14
movq %rsp, %rdi
movl $0x12c, %esi            # imm = 0x12C
movq %rax, %rdx
callq 0x22b0
testq %rax, %rax
je 0x3a9c
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x21f0
movq %r15, %rdi
movl $0x12c, %esi            # imm = 0x12C
movq %r14, %rdx
callq 0x22b0
testq %rax, %rax
jne 0x3a74
movq %r14, %rdi
callq 0x2180
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: statistics::statistics(int)
statistics::statistics(int cons_deg){
	consolidation_degree = cons_deg;

	read_request_size = new int64_t[cons_deg];
	total_read_request_size = new int64_t[cons_deg];
	write_request_size = new int64_t[cons_deg];
	total_write_request_size = new int64_t[cons_deg];

	subreq_state_time = new int64_t[SR_MODE_NUM];

	reset_all();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq %rcx, 0x28(%rdi)
movq %rax, 0x20(%rdi)
movl %eax, 0x30(%rdi)
movups %xmm0, 0x38(%rdi)
movq %rcx, 0x50(%rdi)
movq %rax, 0x48(%rdi)
movups %xmm0, 0x190(%rdi)
movups %xmm0, 0x1a0(%rdi)
movups %xmm0, 0x1b0(%rdi)
movups %xmm0, 0x1c0(%rdi)
movl %esi, (%rdi)
movl %esi, %eax
shlq $0x3, %rax
testl %esi, %esi
movq $-0x1, %r14
cmovnsq %rax, %r14
movq %r14, %rdi
callq 0x2040
movq %rax, 0x58(%rbx)
movq %r14, %rdi
callq 0x2040
movq %rax, 0x60(%rbx)
movq %r14, %rdi
callq 0x2040
movq %rax, 0x68(%rbx)
movq %r14, %rdi
callq 0x2040
movq %rax, 0x70(%rbx)
movl $0x50, %edi
callq 0x2040
movq %rax, 0x188(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3dae
nop
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: statistics::~statistics()
statistics::~statistics(){
	delete read_request_size;
	delete total_read_request_size;
	delete write_request_size;
	delete total_write_request_size;
	delete subreq_state_time;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rdi
movl $0x8, %esi
callq 0x21a0
movq 0x60(%rbx), %rdi
movl $0x8, %esi
callq 0x21a0
movq 0x68(%rbx), %rdi
movl $0x8, %esi
callq 0x21a0
movq 0x70(%rbx), %rdi
movl $0x8, %esi
callq 0x21a0
movq 0x188(%rbx), %rdi
movl $0x8, %esi
popq %rbx
jmp 0x21a0
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: dram_info::dram_info(parameter_value*)
dram_info::dram_info(parameter_value * parameters)
{
	map = new map_info();
	int page_num = parameters->page_block*parameters->block_plane*parameters->plane_lun*parameters->lun_num;
	map->count = page_num * (1-parameters->overprovide); 
	map->map_entry = new entry[page_num];

	dram_capacity = parameters->dram_capacity;
	gcb_capacity = 0; // parameters->gcb_capacity; 
	int io_share = dram_capacity - gcb_capacity; 
	buffer = new write_buffer(io_share, parameters->subpage_page);
	gc_buffer = buffer; // new write_buffer(gcb_capacity , parameters->subpage_page);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0x2190
movq %rax, %r15
movq %rax, 0x10(%rbx)
movl 0x230(%r14), %eax
imull 0x234(%r14), %eax
imull 0x22c(%r14), %eax
imull 0x88(%r14), %eax
cvtsi2ss %eax, %xmm0
movss 0x623b(%rip), %xmm1     # 0xa130
subss 0x25c(%r14), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ecx
movl %ecx, 0x8(%r15)
movslq %eax, %r13
movq %r13, %r12
shlq $0x4, %r12
testl %r13d, %r13d
movq $-0x1, %rdi
cmovnsq %r12, %rdi
callq 0x2040
testl %r13d, %r13d
je 0x3f50
movq %rax, %rcx
addq %r12, %rcx
movq %rax, %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
movb $0x0, 0x4(%rdx)
movq $0x0, 0x8(%rdx)
addq $0x10, %rdx
cmpq %rcx, %rdx
jne 0x3f35
movq %rax, (%r15)
movl 0x8c(%r14), %ebp
movl %ebp, (%rbx)
movl $0x0, 0x4(%rbx)
movl $0x28, %edi
callq 0x2190
movq %rax, %rcx
shll $0xb, %ebp
movl %ebp, %eax
cltd
idivl 0x238(%r14)
movl %eax, 0x8(%rcx)
movq $0x0, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rcx)
movups %xmm0, 0xc(%rcx)
movq %rcx, 0x18(%rbx)
movq %rcx, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: blk_info::blk_info(parameter_value*)
blk_info::blk_info(parameter_value * parameters)
{
	free_page_num = parameters->page_block;	// all pages are free
	last_write_page = -1;	// no page has been programmed
	last_write_time = 0; 
	page_num = parameters->page_block;
	invalid_page_num = 0;

	page_head = new page_info*[parameters->page_block];
	for(int i = 0; i<parameters->page_block; i++)
	{
		page_head[i] = new page_info();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x234(%rsi), %r14d
movl %r14d, 0x4(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
movq $0x0, 0x18(%rdi)
movl %r14d, 0xc(%rdi)
movl $0x0, 0x8(%rdi)
leaq (,%r14,8), %rdi
callq 0x2040
movq %rax, 0x20(%rbx)
testq %r14, %r14
je 0x4020
xorl %r15d, %r15d
movl $0x8, %edi
callq 0x2190
movb $0x0, (%rax)
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x3ffc
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: plane_info::plane_info(parameter_value*)
plane_info::plane_info(parameter_value  * parameters)
{
	free_page=parameters->block_plane*parameters->page_block;
	invalid_page = 0; 
	
	blk_head = new blk_info*[parameters->block_plane];
	for(int i = 0; i<parameters->block_plane; i++)
	{
		blk_head[i] = new blk_info(parameters);
	}
	block_num = parameters->block_plane;
	active_block = 0;
	cold_active_block = 1; 
	erase_count = 0;
	program_count = 0;
	GCMode = false;
	current_state = PLANE_MODE_IDLE;
	next_state = PLANE_MODE_IDLE;
	current_time = 0;
	next_state_predict_time = 0;
	state_time = new int64_t[PLANE_MODE_NUM];
	for (int i = 0; i < PLANE_MODE_NUM; i++){
		state_time[i] = 0;
	}
	scheduled_gc = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x230(%rsi), %r15d
movl 0x234(%rsi), %eax
imull %r15d, %eax
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
leaq (,%r15,8), %rdi
callq 0x2040
movq %rax, 0x20(%rbx)
testq %r15, %r15
je 0x409a
xorl %r12d, %r12d
movl $0x28, %edi
callq 0x2190
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x3fb6
movq 0x20(%rbx), %rax
movq %r15, (%rax,%r12,8)
incq %r12
movl 0x230(%r14), %eax
cmpq %rax, %r12
jb 0x4069
jmp 0x409c
xorl %eax, %eax
movq %rax, 0x28(%rbx)
xorl %r14d, %r14d
movq %r14, 0x10(%rbx)
movq $0x1, 0x18(%rbx)
movq %r14, 0x30(%rbx)
movb $0x0, 0x68(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movl $0x18, %edi
callq 0x2040
movq %rax, 0x60(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %r14, 0x10(%rax)
movq %r14, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r15, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: lun_info::lun_info(parameter_value*)
lun_info::lun_info(parameter_value * parameter)
{
	current_state = LUN_MODE_IDLE;
	next_state = LUN_MODE_IDLE;
	current_time = 0;
	next_state_predict_time = 0;
	read_count = 0;
	program_count = 0;
	erase_count = 0;
	read_avg = 0;
	program_avg = 0;
	gc_avg = 0;
	plane_token = 0;

	GCMode = false;
	plane_head = new plane_info*[parameter->plane_lun];
	for (int i = 0; i<parameter->plane_lun; i++)
	{
		plane_head[i] = new plane_info(parameter);
	}

	state_time = new int64_t [LUN_MODE_NUM];
	for (int i = 0; i < LUN_MODE_NUM; i++)
		state_time[i] = 0;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movl %eax, 0x70(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x78(%rdi)
movl %eax, 0x88(%rdi)
movb $0x0, 0x98(%rdi)
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x14(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movl %eax, 0x58(%rdi)
movups %xmm0, 0x9c(%rdi)
movups %xmm0, 0xac(%rdi)
movups %xmm0, 0xbc(%rdi)
movups %xmm0, 0xcc(%rdi)
movups %xmm0, 0xdc(%rdi)
movups %xmm0, 0xec(%rdi)
movl %eax, 0xfc(%rdi)
movl 0x22c(%rsi), %r15d
leaq (,%r15,8), %rdi
callq 0x2040
movq %rax, (%rbx)
testq %r15, %r15
je 0x41d1
xorl %r12d, %r12d
movl $0x78, %edi
callq 0x2190
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x4026
movq (%rbx), %rax
movq %r15, (%rax,%r12,8)
incq %r12
movl 0x22c(%r14), %eax
cmpq %rax, %r12
jb 0x41a3
movl $0x18, %edi
callq 0x2040
movq %rax, 0x90(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x78, %esi
movq %r15, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: channel_info::channel_info(int, parameter_value*)
channel_info::channel_info(int channel_number, parameter_value * parameters) {
	// set the parameter of each channel
	lun_num = parameters->lun_channel[channel_number];
	current_state = CHANNEL_MODE_IDLE;
	next_state = CHANNEL_MODE_IDLE;
	current_time = 0;
	next_state_predict_time = 0;
	lun_head = new lun_info*[lun_num];

	for (int j = 0; j< lun_num; j++)
	{
		lun_head[j] = new lun_info(parameters);
	}

	state_time = new int64_t[CHANNEL_MODE_NUM];
	for (int i = 0; i < CHANNEL_MODE_NUM; i++){
		state_time[i] = 0;
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movslq %esi, %rax
movslq 0x9c(%rdx,%rax,4), %r15
leaq (,%r15,8), %rax
testq %r15, %r15
movq $-0x1, %rdi
cmovnsq %rax, %rdi
movl %r15d, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movq $0x0, 0x48(%rbx)
callq 0x2040
movq %rax, 0x50(%rbx)
testq %r15, %r15
jle 0x42b9
xorl %r12d, %r12d
movl $0x100, %edi            # imm = 0x100
callq 0x2190
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x4112
movq 0x50(%rbx), %rax
movq %r15, (%rax,%r12,8)
incq %r12
movslq (%rbx), %rax
cmpq %rax, %r12
jl 0x428e
movl $0x18, %edi
callq 0x2040
movq %rax, 0x58(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: file_assert(int, char const*)
void file_assert(int error,const char *s){
	if(error == 0) return;
	printf("open %s error\n",s);
	getchar();
	exit(-1);
}

// Assembly:
testl %edi, %edi
jne 0x42fe
retq
pushq %rax
leaq 0x6210(%rip), %rdi      # 0xa516
xorl %eax, %eax
callq 0x2060
callq 0x2250
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: trace_assert(long, int, unsigned int, int, int)
void trace_assert(int64_t time,int device,unsigned int lsn,int size,int ope)
{
	if(time <0 || device < 0  || size < 0 || ope < 0)
	{
		cout << "trace error: " << time << "  " << device << " " << lsn << " " << size << "  " << ope << endl;
		getchar();
		exit(-1);
	}
	if(time == 0 && device == 0 && lsn == 0 && size == 0 && ope == 0)
	{
		printf("probable read a blank line\n");
		getchar();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r12d
movq %rdi, %r15
testq %rdi, %rdi
js 0x4376
movl %ebp, %eax
orl %r12d, %eax
movl %eax, %ecx
orl %ebx, %ecx
js 0x4376
testq %r15, %r15
setne %cl
orl %r14d, %eax
orl %ebx, %eax
setne %al
orb %cl, %al
jne 0x436d
leaq 0x6218(%rip), %rdi      # 0xa573
callq 0x22a0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2250
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x9c53(%rip), %rdi      # 0xdfd0
leaq 0x61a1(%rip), %rsi      # 0xa525
callq 0x2170
movq %rax, %rdi
movq %r15, %rsi
callq 0x22f0
leaq 0x6198(%rip), %r15      # 0xa533
movq %rax, %rdi
movq %r15, %rsi
callq 0x2170
movq %rax, %rdi
movl %r12d, %esi
callq 0x22d0
leaq 0x6c2a(%rip), %r12      # 0xafe2
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
movq %rax, %rdi
movl %r14d, %esi
callq 0x2240
movq %rax, %rdi
movq %r12, %rsi
callq 0x2170
movq %rax, %rdi
movl %ebp, %esi
callq 0x22d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2170
movq %rax, %rdi
movl %ebx, %esi
callq 0x22d0
movq %rax, %rdi
callq 0x20c0
callq 0x2250
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2210
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: SubQueue::get_subreq(int)
sub_request * SubQueue::get_subreq(int index){

	if (index < 0) return NULL;
	int temp = 0;
	sub_request * qsub = queue_head;

	while (qsub != NULL) {
		if (temp == index) return qsub;
		qsub = qsub->next_node;
		temp++;
	}

	return NULL;

}

// Assembly:
testl %esi, %esi
sets %cl
movq (%rdi), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x4447
incl %esi
decl %esi
je 0x4449
movq 0x70(%rax), %rax
testq %rax, %rax
jne 0x443a
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/narges64[P]SIMBA/common.cpp
// Function: SubQueue::find_subreq(sub_request*)
bool SubQueue::find_subreq(sub_request * sub){
	// is there any request for the same location and same operation (read and write FIXME??? )
	sub_request * qsub = queue_head;

	while (qsub != NULL){

		if (qsub == sub) return true;
		if (qsub->lpn == sub->lpn) return true;
		if (qsub->location->channel == sub->location->channel && qsub->location->lun == sub->location->lun && qsub->location->plane == sub->location->plane){

			if (qsub->location->block == sub->location->block && qsub->location->page == sub->location->page) {
				// FIXME do we need to compare state??
				return true;

			}

		}

		qsub = qsub->next_node;
	}
	return false;
}

// Assembly:
movq (%rdi), %rcx
testq %rcx, %rcx
setne %al
sete %dl
cmpq %rsi, %rcx
sete %dil
orb %dl, %dil
jne 0x44b7
movl 0xc(%rsi), %edx
movb $0x1, %al
cmpl %edx, 0xc(%rcx)
je 0x44b7
movq 0x60(%rcx), %rdi
movl (%rdi), %r9d
movq 0x60(%rsi), %r8
cmpl (%r8), %r9d
jne 0x44a3
movl 0x4(%rdi), %r9d
cmpl 0x4(%r8), %r9d
jne 0x44a3
movl 0x8(%rdi), %r9d
cmpl 0x8(%r8), %r9d
jne 0x44a3
movl 0xc(%rdi), %r9d
cmpl 0xc(%r8), %r9d
jne 0x44a3
movl 0x10(%rdi), %edi
cmpl 0x10(%r8), %edi
je 0x44b7
movq 0x70(%rcx), %rcx
testq %rcx, %rcx
setne %al
cmpq %rsi, %rcx
je 0x44b7
testq %rcx, %rcx
jne 0x4465
retq