LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: control_temp()
void control_temp()
{
char cmd[SLEN];

   if(temp_control_on == 0) return;

   if((test_heat > 0.0F) || (test_cool > 0.0F)) {  // manual pwm control is in effect
      heat_time = test_heat;
      cool_time = test_cool;

      sprintf(cmd, "$CTRL %04d", (int) (heat_time-cool_time));
      send_fan_cmd(cmd);

      #ifdef DEBUG_TEMP_CONTROL
         if(pid_debug || bang_bang) {
            sprintf(debug_text,  "heat:%.1f ms  cool:%.1f ms", heat_time, cool_time);
         }
      #endif
   }
   else {   // we are doing the PID filter stuff
      temp_pid_filter();     // update the PID and fan speed
      analyze_bang_bang();   // do autotune analysis
   }

   last_temp = this_temperature;
}

// Assembly:
leaq 0x239c0b(%rip), %rax    # 0x33fdc1
cmpb $0x0, (%rax)
je 0x10628b
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x239456(%rip), %rax    # 0x33f628
movsd (%rax), %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
leaq 0x23944b(%rip), %rax    # 0x33f630
movsd (%rax), %xmm1
ja 0x1061fd
ucomisd %xmm2, %xmm1
ja 0x1061fd
callq 0x105711
callq 0x1059c4
jmp 0x106272
movsd %xmm0, 0x34f51b(%rip)   # 0x455720
movsd %xmm1, 0x34f51b(%rip)   # 0x455728
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
leaq 0x2fbec(%rip), %rsi     # 0x135e08
leaq -0x110(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
callq 0x5f5fd
leaq 0x239404(%rip), %rax    # 0x33f640
cmpb $0x0, (%rax)
jne 0x10624d
leaq 0x2393f4(%rip), %rax    # 0x33f63c
cmpl $0x0, (%rax)
je 0x106272
movsd 0x34f4cb(%rip), %xmm0   # 0x455720
movsd 0x34f4cb(%rip), %xmm1   # 0x455728
leaq 0x23873c(%rip), %rdi    # 0x33e9a0
leaq 0x2fc73(%rip), %rsi     # 0x135ede
movb $0x2, %al
callq 0x9060
movsd 0x34f46e(%rip), %xmm0   # 0x4556e8
movsd %xmm0, 0x34f46e(%rip)   # 0x4556f0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: apply_heat()
void apply_heat(void)
{
   if(lpt_addr) {  // using parallel port to control temp
      lpt_val = (lpt_val & 0xF0) | 0x09;
      outp(lpt_addr, lpt_val);
   }
   else if(com[fan_port].com_port > 0) { // using serial port DTR line to control temp
      SetDtrLine(fan_port, HEAT);
      SetRtsLine(fan_port, ENABLE);
   }

   if(a_heating == 0) {
      heat_on_tick = GetMsecs(); 
   }
   a_heating = 1;
   a_cooling = 0;
   a_holding = 0;
   temp_dir = UP_ARROW;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x239b37(%rip), %rax    # 0x33fdd0
movl (%rax), %edi
testl %edi, %edi
je 0x1062b9
leaq 0x239b2e(%rip), %rax    # 0x33fdd4
movzbl (%rax), %esi
andl $-0x10, %esi
orl $0x9, %esi
movb %sil, (%rax)
callq 0xaeb4
jmp 0x1062e6
leaq 0x20800c(%rip), %rbx    # 0x30e2cc
movl (%rbx), %edi
imulq $0x2260, %rdi, %rax     # imm = 0x2260
leaq 0x208010(%rip), %rcx    # 0x30e2e0
cmpl $0x0, (%rcx,%rax)
jle 0x1062e6
xorl %esi, %esi
callq 0xaeba
movl (%rbx), %edi
xorl %esi, %esi
callq 0xaf06
cmpb $0x0, 0x34f3f3(%rip)    # 0x4556e0
jne 0x1062fc
callq 0xaea1
movsd %xmm0, 0x34f434(%rip)   # 0x455730
movb $0x1, 0x34f3dd(%rip)    # 0x4556e0
xorl %eax, %eax
movb %al, 0x34f3d6(%rip)     # 0x4556e1
movb %al, 0x34f3d1(%rip)     # 0x4556e2
leaq 0x206c70(%rip), %rax    # 0x30cf88
movb $0x18, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: apply_cool()
void apply_cool() 
{
   if(lpt_addr) {  // using parallel port to control temp
      lpt_val = (lpt_val & 0xF0) | 0x0A;
      outp(lpt_addr, lpt_val);
   }
   else if(com[fan_port].com_port > 0) { // using serial port DTR line to control temp
      SetDtrLine(fan_port, COOL);
      SetRtsLine(fan_port, ENABLE);
   }

   if(a_cooling == 0) {
      cool_on_tick = GetMsecs(); 
   }
   a_cooling = 1;
   a_heating = 0;
   a_holding = 0;
   temp_dir = DOWN_ARROW;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x239aa1(%rip), %rax    # 0x33fdd0
movl (%rax), %edi
testl %edi, %edi
je 0x10634f
leaq 0x239a98(%rip), %rax    # 0x33fdd4
movzbl (%rax), %esi
andl $-0x10, %esi
orl $0xa, %esi
movb %sil, (%rax)
callq 0xaeb4
jmp 0x10637f
leaq 0x207f76(%rip), %rbx    # 0x30e2cc
movl (%rbx), %edi
imulq $0x2260, %rdi, %rax     # imm = 0x2260
leaq 0x207f7a(%rip), %rcx    # 0x30e2e0
cmpl $0x0, (%rcx,%rax)
jle 0x10637f
movl $0x1, %esi
callq 0xaeba
movl (%rbx), %edi
xorl %esi, %esi
callq 0xaf06
cmpb $0x0, 0x34f35b(%rip)    # 0x4556e1
jne 0x106395
callq 0xaea1
movsd %xmm0, 0x34f3a3(%rip)   # 0x455738
movb $0x1, 0x34f345(%rip)    # 0x4556e1
xorl %eax, %eax
movb %al, 0x34f33c(%rip)     # 0x4556e0
movb %al, 0x34f338(%rip)     # 0x4556e2
leaq 0x206bd7(%rip), %rax    # 0x30cf88
movb $0x19, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: hold_temp()
void hold_temp()
{
   if(lpt_addr) {  // we are using the parallel port to control temp
      lpt_val = (lpt_val & 0xF0) | 0x06;
      outp(lpt_addr, lpt_val);
   }
   else if(com[fan_port].com_port > 0) { // using serial port DTR line to control temp
      SetDtrLine(fan_port, COOL);
      SetRtsLine(fan_port, DISABLE);
   }
   send_fan_cmd("$HOLD");

   if(a_holding == 0) {
      hold_on_tick = GetMsecs(); 
   }
   a_holding = 1;
   a_heating = 0;
   a_cooling = 0;
   temp_dir = '=';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x239a08(%rip), %rax    # 0x33fdd0
movl (%rax), %edi
testl %edi, %edi
je 0x1063e8
leaq 0x2399ff(%rip), %rax    # 0x33fdd4
movzbl (%rax), %esi
andl $-0x10, %esi
orl $0x6, %esi
movb %sil, (%rax)
callq 0xaeb4
jmp 0x10641b
leaq 0x207edd(%rip), %rbx    # 0x30e2cc
movl (%rbx), %edi
imulq $0x2260, %rdi, %rax     # imm = 0x2260
leaq 0x207ee1(%rip), %rcx    # 0x30e2e0
cmpl $0x0, (%rcx,%rax)
jle 0x10641b
movl $0x1, %esi
callq 0xaeba
movl (%rbx), %edi
movl $0x1, %esi
callq 0xaf06
leaq 0x2fad7(%rip), %rdi     # 0x135ef9
callq 0x5f5fd
cmpb $0x0, 0x34f2b4(%rip)    # 0x4556e2
jne 0x10643d
callq 0xaea1
movsd %xmm0, 0x34f303(%rip)   # 0x455740
movb $0x1, 0x34f29e(%rip)    # 0x4556e2
xorl %eax, %eax
movb %al, 0x34f294(%rip)     # 0x4556e0
movb %al, 0x34f28f(%rip)     # 0x4556e1
leaq 0x206b2f(%rip), %rax    # 0x30cf88
movb $0x3d, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: enable_temp_control()
void enable_temp_control()
{
   if(lpt_port) {  // get lpt port address from bios area
      lpt_addr = init_lpt();
   }
   else lpt_addr = 0;

   if(lpt_addr) {  // turn on parallel port temp control unit
      lpt_val = (lpt_val & 0x0F) | 0x90;
      outp(lpt_addr, lpt_val);
   }
   else if(com[fan_port].com_port > 0) { // using serial port lines to control temp
      SetRtsLine(fan_port, ENABLE);
   }
   send_fan_cmd("$INIT");

   low_ok = high_ok = 0;
   HEAT_OVERSHOOT = COOL_UNDERSHOOT = 0.0F;

   temp_control_on = 1;
   hold_temp();
}

// Assembly:
leaq 0x230bb2(%rip), %rax    # 0x33701c
movl (%rax), %eax
cmpl $0x1, %eax
je 0x106489
cmpl $0x3, %eax
je 0x106482
cmpl $0x2, %eax
jne 0x106492
movl $0x278, %edi            # imm = 0x278
jmp 0x10648e
movl $0x3bc, %edi            # imm = 0x3BC
jmp 0x10648e
movl $0x378, %edi            # imm = 0x378
xorl %eax, %eax
jmp 0x106496
xorl %edi, %edi
movb $0x1, %al
pushq %rbp
movq %rsp, %rbp
leaq 0x23992f(%rip), %rcx    # 0x33fdd0
movl %edi, (%rcx)
testb %al, %al
je 0x1064cd
leaq 0x207e1e(%rip), %rax    # 0x30e2cc
movl (%rax), %edi
imulq $0x2260, %rdi, %rax     # imm = 0x2260
leaq 0x207e22(%rip), %rcx    # 0x30e2e0
cmpl $0x0, (%rcx,%rax)
jle 0x1064e8
xorl %esi, %esi
callq 0xaf06
jmp 0x1064e8
leaq 0x239900(%rip), %rax    # 0x33fdd4
movzbl (%rax), %esi
andl $0xf, %esi
orl $0x90, %esi
movb %sil, (%rax)
callq 0xaeb4
leaq 0x2fa10(%rip), %rdi     # 0x135eff
callq 0x5f5fd
xorl %eax, %eax
movq %rax, 0x34f2cb(%rip)    # 0x4557c8
movq %rax, 0x34f2bc(%rip)    # 0x4557c0
movq %rax, 0x34f2cd(%rip)    # 0x4557d8
movq %rax, 0x34f2be(%rip)    # 0x4557d0
leaq 0x2398a8(%rip), %rax    # 0x33fdc1
movb $0x1, (%rax)
popq %rbp
jmp 0x1063bb
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: disable_temp_control()
void disable_temp_control()
{
   if(temp_control_on == 0) return;

   hold_temp();
   if(lpt_addr) {  // using parallel port to control temp
      lpt_val = (lpt_val & 0x0F) | 0x60;
      outp(lpt_addr, lpt_val);
   }
   else if(com[fan_port].com_port > 0) { // using serial port to control temp
     SetRtsLine(fan_port, DISABLE);
   }
   send_fan_cmd("$STOP");

   temp_control_on = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x239892(%rip), %rbx    # 0x33fdc1
cmpb $0x0, (%rbx)
je 0x106596
callq 0x1063bb
leaq 0x239890(%rip), %rax    # 0x33fdd0
movl (%rax), %edi
testl %edi, %edi
je 0x106560
leaq 0x239887(%rip), %rax    # 0x33fdd4
movzbl (%rax), %esi
andl $0xf, %esi
orl $0x60, %esi
movb %sil, (%rax)
callq 0xaeb4
jmp 0x106587
leaq 0x207d65(%rip), %rax    # 0x30e2cc
movl (%rax), %edi
imulq $0x2260, %rdi, %rax     # imm = 0x2260
leaq 0x207d69(%rip), %rcx    # 0x30e2e0
cmpl $0x0, (%rcx,%rax)
jle 0x106587
movl $0x1, %esi
callq 0xaf06
leaq 0x2f977(%rip), %rdi     # 0x135f05
callq 0x5f5fd
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: show_osc_pid_values()
void show_osc_pid_values()
{
   if(dac_dac) return;

   sprintf(plot_title, "bP(%.2f %c %.4f) bD(%.2f %c %.4f) bF(%.2f %c %.4f) bI(%.1f %c %.3f)  bO=%.3f bL=%.3f bS=%.3f bR=%.3f b9=%-3d", 
      OSC_P_GAIN,RIGHT_ARROW,osc_k1, 
      OSC_D_TC,RIGHT_ARROW,osc_k2, 
      OSC_FILTER_TC,RIGHT_ARROW,osc_k3, 
      OSC_I_TC,RIGHT_ARROW,osc_k4, 
      OSC_FILTER_OFFSET, osc_k6, osc_k7, osc_k8, osc_postfilter);
   title_type = OTHER;
}

// Assembly:
leaq 0x2350f8(%rip), %rax    # 0x33b81c
cmpl $0x0, (%rax)
je 0x10672a
retq
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x238f67(%rip), %rax    # 0x33f6a0
movsd (%rax), %xmm0
movsd 0x34f1f3(%rip), %xmm1   # 0x455938
leaq 0x238f5c(%rip), %rax    # 0x33f6a8
movsd (%rax), %xmm2
movsd 0x34f1e8(%rip), %xmm3   # 0x455940
leaq 0x238f51(%rip), %rax    # 0x33f6b0
movsd (%rax), %xmm4
movsd 0x34f1dd(%rip), %xmm5   # 0x455948
leaq 0x238f46(%rip), %rax    # 0x33f6b8
movsd (%rax), %xmm6
movsd 0x34f1d2(%rip), %xmm7   # 0x455950
leaq 0x238f3b(%rip), %rax    # 0x33f6c0
movsd (%rax), %xmm8
movsd 0x34f1cd(%rip), %xmm9   # 0x455960
movsd 0x34f1cc(%rip), %xmm10  # 0x455968
movsd 0x34f1cb(%rip), %xmm11  # 0x455970
leaq 0x238ee0(%rip), %rax    # 0x33f68c
movl (%rax), %eax
movl %eax, 0x20(%rsp)
movsd %xmm11, 0x18(%rsp)
movsd %xmm10, 0x10(%rsp)
movsd %xmm9, 0x8(%rsp)
movsd %xmm8, (%rsp)
leaq 0x23807c(%rip), %rdi    # 0x33e850
leaq 0x2f730(%rip), %rsi     # 0x135f0b
movl $0x1a, %edx
movl $0x1a, %ecx
movl $0x1a, %r8d
movl $0x1a, %r9d
movb $0x8, %al
callq 0x9060
leaq 0x238acd(%rip), %rax    # 0x33f2cc
movl $0x3, (%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: reset_osc_pid(int)
void reset_osc_pid(int kbd_cmd)
{
   disable_osc_control();

   osc_PID_out = 0.0;          // new filter output
   last_osc_PID_out = 0.0;     // previous filter output
   osc_PID_error = 0.0;        // new osc error
   last_osc_PID_error = 0.0;   // previous osc error
   last_osc_PID_display = 0.0; // previous PID filter value (for debug display)
   osc_integral_step = 0.0;    // integrator update factor
   osc_integrator = 0.0;       // integral value

   post_q_count = 0;
   new_postfilter();

// if(kbd_cmd) enable_osc_control(); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x238ec0(%rip), %rbx    # 0x33f6d8
cmpb $0x0, (%rbx)
je 0x106844
leaq 0x206c70(%rip), %rax    # 0x30d494
movb $0x1, (%rax)
leaq 0x1120a2(%rip), %rax    # 0x2188d0
cmpq $0x2000000, (%rax)      # imm = 0x2000000
je 0x106841
movl $0x5, %edi
callq 0x6d6ce
movb $0x0, (%rbx)
xorl %eax, %eax
movq %rax, 0x34f0b3(%rip)    # 0x455900
movq %rax, 0x34f0b4(%rip)    # 0x455908
movq %rax, 0x34f0b5(%rip)    # 0x455910
movq %rax, 0x34f0b6(%rip)    # 0x455918
movq %rax, 0x34f0b7(%rip)    # 0x455920
movq %rax, 0x34f0b8(%rip)    # 0x455928
movq %rax, 0x34f0b9(%rip)    # 0x455930
leaq 0x238e12(%rip), %rax    # 0x33f690
movl $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10688f
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: new_postfilter()
void new_postfilter()
{
double post_val;
int i;

   if(1 || (osc_postfilter < post_q_count)) {  // changing filter size,  rebuild filter queue
      if(post_q_count) post_val = post_q_sum / (double) post_q_count;
      else             post_val = osc_PID_out;
      post_q_sum = 0.0;
      for(i=0; i<osc_postfilter; i++) {
         osc_post_q[i] = post_val;
         post_q_sum += post_val;
      }
      post_q_count = osc_postfilter;
      post_q_in = 0;
   }
}

// Assembly:
leaq 0x238dfa(%rip), %rax    # 0x33f690
movl (%rax), %ecx
testl %ecx, %ecx
je 0x1068ae
movsd 0x350784(%rip), %xmm0   # 0x457028
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
jmp 0x1068b6
movsd 0x34f04a(%rip), %xmm0   # 0x455900
movq $0x0, 0x350767(%rip) # 0x457028
leaq 0x238dc4(%rip), %rcx    # 0x33f68c
movslq (%rcx), %rcx
testq %rcx, %rcx
jle 0x1068fe
movq %rcx, %rdx
shlq $0x3, %rdx
xorpd %xmm1, %xmm1
xorl %esi, %esi
leaq 0x34f47c(%rip), %rdi    # 0x455d60
movsd %xmm0, (%rsi,%rdi)
addsd %xmm0, %xmm1
addq $0x8, %rsi
cmpq %rsi, %rdx
jne 0x1068e4
movsd %xmm1, 0x35072a(%rip)   # 0x457028
pushq %rbp
movq %rsp, %rbp
movl %ecx, (%rax)
leaq 0x238d89(%rip), %rax    # 0x33f694
movl $0x0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: enable_osc_control()
void enable_osc_control()
{
   osc_discipline = 0;
   set_discipline_mode(SET_DIS_MODE_DISABLE);

   if(rcvr_type == X72_RCVR) {
      set_x72_dds(last_x72_dds);
      osc_pid_initial_voltage = (DATA_SIZE) last_x72_dds;
   }
   else {
      set_dac_voltage(dac_voltage, 5);
      osc_pid_initial_voltage = dac_voltage;
   }

   osc_control_on = 1;
   osc_rampup = 1.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2064d0(%rip), %rax    # 0x30d494
movb $0x0, (%rax)
movl $0x4, %edi
callq 0x6d6ce
leaq 0x1118f8(%rip), %rax    # 0x2188d0
cmpq $0x2000000, (%rax)      # imm = 0x2000000
jne 0x106ff3
leaq 0x113ef8(%rip), %rbx    # 0x21aee0
movsd (%rbx), %xmm0
callq 0x70f27
jmp 0x107008
leaq 0x205a06(%rip), %rbx    # 0x30ca00
movsd (%rbx), %xmm0
movl $0x5, %edi
callq 0x6ced6
movsd (%rbx), %xmm0
leaq 0x20614d(%rip), %rax    # 0x30d160
movsd %xmm0, (%rax)
leaq 0x2386ba(%rip), %rax    # 0x33f6d8
movb $0x1, (%rax)
leaq 0x2386b8(%rip), %rax    # 0x33f6e0
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: control_osc()
void control_osc()
{
double true_pps;

   // calculate integral of osc signal
   if(trick_scale) {
      if(trick_tick) --trick_tick;
      else {
         true_pps = (pps_offset + trick_value);
         trick_value = (true_pps * trick_scale);

         if(trick_value > MAX_TRICK) trick_value = MAX_TRICK;
         else if(trick_value <= (-MAX_TRICK)) trick_value = (-MAX_TRICK);

         set_pps(user_pps_enable, pps_polarity,  trick_value*1.0E-9, pps1_delay, 300.0, 0);
         request_pps_info();
         sprintf(plot_title,  "Cable trick:  scale=%f  ofs=%f", trick_scale, trick_value);
         title_type = OTHER;
         trick_tick = 5;
      }
   }

   if(osc_control_on) {  // we are controlling the oscillator disciplining
      osc_pid_filter();
   }

   if(dac_dac) {         // we are doing a osc param autotune
      calc_osc_gain();
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2386ce(%rip), %rbx    # 0x33f718
movsd (%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x10705e
jnp 0x107126
movl 0x34ffcc(%rip), %eax    # 0x457030
testl %eax, %eax
je 0x10706f
decl %eax
jmp 0x107120
leaq 0x205742(%rip), %rax    # 0x30c7b8
movsd (%rax), %xmm1
leaq 0x2386a7(%rip), %r14    # 0x33f728
addsd (%r14), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, (%r14)
movsd 0x1fa1(%rip), %xmm1     # 0x109038
ucomisd %xmm1, %xmm0
ja 0x1070ab
movsd 0x203b(%rip), %xmm1     # 0x1090e0
ucomisd %xmm0, %xmm1
jb 0x1070b0
movsd %xmm1, (%r14)
leaq 0x206c6a(%rip), %rax    # 0x30dd21
movzbl (%rax), %edi
leaq 0x206c57(%rip), %rax    # 0x30dd18
movzbl (%rax), %esi
movsd (%r14), %xmm0
mulsd 0x1711f(%rip), %xmm0    # 0x11e1f0
leaq 0x206d00(%rip), %rax    # 0x30ddd8
movsd (%rax), %xmm1
movss 0x2571c(%rip), %xmm2    # 0x12c800
xorl %edx, %edx
callq 0x6ad1d
callq 0x6a9e7
movsd (%rbx), %xmm0
movsd (%r14), %xmm1
leaq 0x237750(%rip), %rdi    # 0x33e850
leaq 0x2ef25(%rip), %rsi     # 0x13602c
movb $0x2, %al
callq 0x9060
leaq 0x2381b7(%rip), %rax    # 0x33f2cc
movl $0x3, (%rax)
movl $0x5, %eax
movl %eax, 0x34ff0a(%rip)    # 0x457030
leaq 0x2385ab(%rip), %rax    # 0x33f6d8
cmpb $0x0, (%rax)
je 0x107137
callq 0x106ab7
leaq 0x2346de(%rip), %rax    # 0x33b81c
cmpl $0x0, (%rax)
je 0x10714c
popq %rbx
popq %r14
popq %rbp
jmp 0x104c56
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: logg2(long)
int logg2(long x)
{
    unsigned long mask,i;

    if(x == 0) return(-1L);     /* zero is an error, return -1 */
    x--;                        /* get the max index, x-1 */

    for(mask=1,i=0; ; mask*=2,i++) {
        if(x == 0) return(i);   /* return logg2 if all zero */
        x = x & (~mask);        /* AND off a bit */
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x107602
decq %rdi
je 0x107609
movl $0x1, %ecx
xorl %eax, %eax
movq %rcx, %rdx
notq %rdx
addq %rcx, %rcx
incl %eax
andq %rdx, %rdi
jne 0x1075f0
jmp 0x10760b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x10760b
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: set_fft_scale()
void set_fft_scale()
{
   // configure FFT/histogram plot

   if(fft_type == HIST_TYPE) {     // doing histogram instead of FFT
      plot[FFT].plot_id = "HIST";
      if(fft_db) plot[FFT].units = "dB";
      else       plot[FFT].units = "cnt";

      plot[FFT].user_scale = 0;
      plot[FFT].scale_factor = 1.0F;
      plot[FFT].plot_center = 0.0F;
      plot[FFT].float_center = 1;

      fft_scale = 1;
   }
   else if(fft_db) {
      plot[FFT].plot_id = "FFT";          // assume we are doing an FFT
      plot[FFT].units = "dB";

      plot[FFT].user_scale = 0;
      plot[FFT].scale_factor = 1.0F;
      plot[FFT].plot_center = 0.0F;
      plot[FFT].float_center = 1;
   }
   else {
      plot[FFT].plot_id = "FFT";          // assume we are doing an FFT
      plot[FFT].units = "x ";

      plot[FFT].user_scale = 1;
      plot[FFT].scale_factor = 1.0F / ((float) PLOT_HEIGHT/(float)(VERT_MAJOR*2));
      plot[FFT].plot_center = 0.0F;
      plot[FFT].float_center = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x11369a(%rip), %rax    # 0x21b47d
cmpb $0x1, (%rax)
jne 0x107e63
leaq 0x2e296(%rip), %rax     # 0x136085
leaq 0x55f3a(%rip), %rcx     # 0x15dd30
movq %rax, 0xcb0(%rcx)
leaq 0x237f90(%rip), %rax    # 0x33fd94
cmpb $0x0, (%rax)
leaq 0x2e27c(%rip), %rax     # 0x13608a
leaq 0x13c23(%rip), %rdx     # 0x11ba38
cmoveq %rax, %rdx
movq %rdx, 0xcb8(%rcx)
movl $0x0, 0xce0(%rcx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xce8(%rcx)
movq $0x0, 0xcd8(%rcx)
movl $0x1, 0xccc(%rcx)
leaq 0x237f31(%rip), %rax    # 0x33fd88
movq $0x1, (%rax)
jmp 0x107f2a
leaq 0x237f2a(%rip), %rax    # 0x33fd94
cmpb $0x0, (%rax)
leaq 0x17a6(%rip), %rcx      # 0x10961a
leaq 0x55eb5(%rip), %rax     # 0x15dd30
movq %rcx, 0xcb0(%rax)
je 0x107ec4
leaq 0x13bad(%rip), %rcx     # 0x11ba38
movq %rcx, 0xcb8(%rax)
movl $0x0, 0xce0(%rax)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0xce8(%rax)
movq $0x0, 0xcd8(%rax)
movl $0x1, 0xccc(%rax)
jmp 0x107f2a
leaq 0x1109bd(%rip), %rcx    # 0x218888
cvtsi2ssl (%rcx), %xmm0
leaq 0x1aaf2(%rip), %rcx     # 0x1229c8
movq %rcx, 0xcb8(%rax)
leaq 0x110988(%rip), %rcx    # 0x21886c
movl (%rcx), %ecx
addl %ecx, %ecx
cvtsi2ss %ecx, %xmm1
movl $0x1, 0xce0(%rax)
divss %xmm1, %xmm0
movss 0x50d2(%rip), %xmm1     # 0x10cfd4
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0xce8(%rax)
movq $0x0, 0xcd8(%rax)
movl $0x0, 0xccc(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: calc_fft(int)
long calc_fft(int id)
{
long length, m;
long points;

   fft_id = id;
   set_fft_scale();

   if(fft_type == HIST_TYPE) {  // do histogram instead of an FFT
      if(id == FFT) {
//      edit_error("Cannot calculate the histogram of the histogram plot!");
//      return 0;
id = pre_fft_plot;
      }
      points = calc_plot_hist(id);
   }
   else {  // do FFT instead of histogram
      if(id == FFT) {
        edit_error("Cannot calculate the FFT of the FFT plot!");
        return 0;
      }

      length = max_fft_len;
      if(length < 2) {  /* Check for power of 2 input size */
        edit_error("FFT size must be a power of 2 greater than 1");
        return 0;
      }

      m = logg2(length);
      if((1<<m) != length) {  /* Check for power of 2 input size */
        edit_error("FFT size must be a power of 2.");
        return 0;
      }

      fps = ((1.0F/view_interval)/2.0F) / (float) (length/2);
      points = process_signal(length, id);
   }

   // set scale factors and enable the FFT plot
   if(show_live_fft == 0) {
      plot[FFT].show_stat = 1;
      if(plot[FFT].show_plot == 0) toggle_plot(FFT);
   }

   return points;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x11336d(%rip), %rax    # 0x21b47e
movb %bl, (%rax)
callq 0x107dd8
leaq 0x11335e(%rip), %rax    # 0x21b47d
cmpb $0x1, (%rax)
jne 0x108179
cmpl $0xe, %ebx
jne 0x108132
leaq 0x237c34(%rip), %rax    # 0x33fd64
movl (%rax), %ebx
movl %ebx, %edi
callq 0x108238
movq %rax, %rbx
leaq 0x1132e7(%rip), %rax    # 0x21b42a
cmpb $0x0, (%rax)
jne 0x10822e
leaq 0x55bdd(%rip), %rax     # 0x15dd30
movl $0x1, 0xd84(%rax)
cmpl $0x0, 0xcc8(%rax)
jne 0x10822e
movl $0xe, %edi
callq 0x32e20
jmp 0x10822e
cmpl $0xe, %ebx
jne 0x10818a
leaq 0x2df6c(%rip), %rdi     # 0x1360f1
jmp 0x108227
leaq 0x237be7(%rip), %rax    # 0x33fd78
movq (%rax), %rdi
cmpq $0x1, %rdi
jg 0x1081a6
leaq 0x2df7a(%rip), %rdi     # 0x13611b
jmp 0x108227
movq %rdi, %rax
decq %rax
je 0x1081c7
movl $0x1, %edx
xorl %ecx, %ecx
movq %rdx, %rsi
notq %rsi
addq %rdx, %rdx
incl %ecx
andq %rsi, %rax
jne 0x1081b5
jmp 0x1081c9
xorl %ecx, %ecx
movl $0x1, %eax
shll %cl, %eax
cltq
cmpq %rax, %rdi
jne 0x108220
leaq 0x1131c2(%rip), %rax    # 0x21b3a0
cvtsi2ssq (%rax), %xmm0
movss 0x4de9(%rip), %xmm1     # 0x10cfd4
divss %xmm0, %xmm1
mulss 0x4ded(%rip), %xmm1     # 0x10cfe4
movq %rdi, %rax
shrq %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
divss %xmm0, %xmm1
leaq 0x237b80(%rip), %rax    # 0x33fd90
movss %xmm1, (%rax)
movl %ebx, %esi
callq 0x10760d
jmp 0x108139
leaq 0x2df21(%rip), %rdi     # 0x136148
callq 0x2326e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: dump_hist_plot()
void dump_hist_plot()
{
int i;
DATA_SIZE val;

   // dump the plot histogram data to the debug_file

   if(debug_file == 0) return;
   if(plot[FFT].show_plot == 0) return;
   if(fft_type != HIST_TYPE) return;

   if(show_live_fft) {
      fprintf(debug_file, "\nLive %s plot histogram:\n", plot[fft_id].plot_id);
   }
   else {
      fprintf(debug_file, "\nSingle %s plot histogram:\n", plot[fft_id].plot_id);
   }

   for(i=0; i<hist_size; i++) {
      if(plot_hist[i] == 0) continue;  // empty bin
      val = hist_minv + (hist_bin_width*((DATA_SIZE) i));
      fprintf(debug_file, "bin:%d  val:%.9f  count:%ld\n", i, val, plot_hist[i]);
   }

   fprintf(debug_file, "\n");
   fflush(debug_file);
}

// Assembly:
leaq 0x135d0a(%rip), %rax    # 0x23e390
movq (%rax), %rdi
testq %rdi, %rdi
je 0x10878b
leaq 0x55697(%rip), %rax     # 0x15dd30
cmpl $0x0, 0xcc8(%rax)
je 0x10878b
leaq 0x112dd0(%rip), %rcx    # 0x21b47d
cmpb $0x1, (%rcx)
jne 0x10878b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x112d5f(%rip), %rcx    # 0x21b42a
leaq 0x112dac(%rip), %rdx    # 0x21b47e
movzbl (%rdx), %edx
imulq $0xe8, %rdx, %rdx
cmpb $0x0, (%rcx)
movq (%rax,%rdx), %rdx
leaq 0x2da97(%rip), %rax     # 0x136181
leaq 0x2da76(%rip), %rsi     # 0x136167
cmoveq %rax, %rsi
xorl %eax, %eax
callq 0x9560
leaq 0x11ad8d(%rip), %r12    # 0x223490
cmpq $0x0, (%r12)
jle 0x108761
xorl %ebx, %ebx
leaq 0x112d7d(%rip), %r13    # 0x21b490
leaq 0x11ad8e(%rip), %r15    # 0x2234a8
leaq 0x2da7c(%rip), %r14     # 0x13619d
movq (%r13,%rbx,8), %rcx
testq %rcx, %rcx
je 0x108758
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd (%r15), %xmm0
leaq 0x11ad5a(%rip), %rax    # 0x223498
addsd (%rax), %xmm0
leaq 0x135c47(%rip), %rax    # 0x23e390
movq (%rax), %rdi
movq %r14, %rsi
movl %ebx, %edx
movb $0x1, %al
callq 0x9560
incq %rbx
cmpq %rbx, (%r12)
jg 0x108721
leaq 0x135c28(%rip), %rbx    # 0x23e390
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x9480
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9420
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathmsc.cpp
// Function: scale_hist_val(int, double)
DATA_SIZE scale_hist_val(int id, DATA_SIZE val)
{
   // convert a raw plot queue data value to it's displayed value

//!!!!!! we need to handle more cases... see label_cursor_val()
   if(tie_plot(id)) {  // it's a time interval error plot
      if(plot[id].show_freq) {  // frequency mode
         val = (DATA_SIZE) tie_to_freq(id, (double) val);
      } 
   }
   else if(id == TEMP) {
////  val /= 1000.0;
   }

   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movsd %xmm0, -0x10(%rbp)
movl %edi, %ebx
callq 0x13ccd
testl %eax, %eax
je 0x1087cf
movslq %ebx, %rax
imulq $0xe8, %rax, %rax
leaq 0x5557d(%rip), %rcx     # 0x15dd30
cmpl $0x0, 0xd0(%rcx,%rax)
je 0x1087cf
movl %ebx, %edi
movsd -0x10(%rbp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xad8a2
movsd -0x10(%rbp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/exercises/ex16_53.cc
// Function: main
int main(int argc, char const *argv[])
{
	int i = 0;
	double d = 3.14;
	std::string s = "Hello World!";
	Foo foo;
	Str str;
	// error: cannot bind ‘std::ostream {aka std::basic_ostream<char>}’ lvalue to ‘std::basic_ostream<char>&&’
	// return os << t;
	// print(std::cout, foo);
	print(std::cout, 1) << std::endl;
	print(std::cout, 1, 2.0f) << std::endl;
	print(std::cout, 1, 2.0f, s, str) << std::endl;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq -0x30(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xd8a(%rip), %rsi       # 0x2004
leaq 0xd8f(%rip), %rdx       # 0x2010
leaq -0x40(%rbp), %rdi
callq 0x147e
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movabsq $0x7473207974706d65, %rax # imm = 0x7473207974706D65
movq %rax, (%r15)
movl $0x676e6972, 0x8(%r15)  # imm = 0x676E6972
movq $0xc, -0x8(%r15)
movb $0x0, 0xc(%r15)
movq 0x2d1d(%rip), %rdi      # 0x3fd8
movl $0x1, %esi
callq 0x10d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq -0x20(%rbp), %rsi
movl $0x1, (%rsi)
leaq -0x1c(%rbp), %rdx
movl $0x40000000, (%rdx)     # imm = 0x40000000
movq 0x2cce(%rip), %rdi      # 0x3fd8
callq 0x13fb
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
leaq -0x20(%rbp), %rsi
movl $0x1, (%rsi)
leaq -0x1c(%rbp), %rdx
movl $0x40000000, (%rdx)     # imm = 0x40000000
movq 0x2c84(%rip), %rdi      # 0x3fd8
leaq -0x40(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0x1433
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1080
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x13a0
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x1090
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0x13b5
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x1090
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13c6
jmp 0x13c6
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x13de
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x1090
movq -0x40(%rbp), %rdi
cmpq %r14, %rdi
je 0x13f3
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x1090
movq %rbx, %rdi
callq 0x10e0
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH03_StringsVectorsAndArrays/examples/../../CH01_GettingStarted/examples/Sales_item.h
// Function: operator>>(std::istream&, Sales_item&)
std::istream&
operator>>(std::istream& in, Sales_item& s)
{
    double price;
    in >> s.bookNo >> s.units_sold >> price;
    // check that the inputs succeeded
    if (in)
        s.revenue = s.units_sold * price;
    else
        s = Sales_item();  // input failed: reset object to default state
    return in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2140
leaq 0x20(%r14), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x21a0
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x2080
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
je 0x248b
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r13
movaps %xmm0, -0x10(%r13)
movaps %xmm0, (%r13)
movaps %xmm0, 0x10(%r13)
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb $0x0, (%r13)
movl $0x0, 0x10(%r13)
movq %rax, 0x18(%r13)
leaq -0x60(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x2130
movapd 0x20(%r12), %xmm0
movupd %xmm0, (%r15)
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x249f
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2110
jmp 0x249f
movl 0x20(%r14), %eax
cvtsi2sd %rax, %xmm0
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x28(%r14)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: TouchFile(char const*)
bool TouchFile(const char* filename) {
	std::ifstream ifs(filename);
	if (!ifs.is_open()) {
		fprintf(stderr, "File [%s] not exsit.\n", filename);
		exit(-1);
	}
	ifs.close();
}

// Assembly:
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x22f0
leaq 0x80(%rsp), %rdi
callq 0x2090
testb %al, %al
je 0x2514
leaq 0x8(%rsp), %rdi
callq 0x2080
movq 0x5abd(%rip), %rax      # 0x7fd8
movq (%rax), %rdi
leaq 0x2b1b(%rip), %rsi      # 0x5040
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2250
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2200
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: ExecCmd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int ExecCmd(string cmd, string& res) {
	if (cmd.size() == 0) {  //cmd is empty 
		return -1;
	}

	char buffer[1024] = { 0 };
	string result = "";
	FILE* pin = popen(cmd.c_str(), "r");
	if (!pin) { //popen failed 
		return -1;
	}

	res.clear();
	while (!feof(pin)) {
		if (fgets(buffer, sizeof(buffer), pin) != NULL) {
			result += buffer;
		}
	}

	res = result;
	return pclose(pin); //-1:pclose failed; else shell ret
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
cmpq $0x0, 0x8(%rdi)
je 0x2617
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x2120
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2ada(%rip), %rdx      # 0x506a
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x3796
movq (%r14), %rdi
leaq 0x2ab1(%rip), %rsi      # 0x5056
callq 0x20c0
testq %rax, %rax
je 0x261e
movq %rax, %r14
movq $0x0, 0x8(%rbx)
movq (%rbx), %rax
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x2290
testl %eax, %eax
jne 0x2600
leaq 0x20(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x22a0
testq %rax, %rax
je 0x25f4
movq %r12, %rdi
movq %r15, %rsi
callq 0x2300
movq %r14, %rdi
callq 0x2290
testl %eax, %eax
je 0x25d4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2240
movl %eax, %ebx
jmp 0x2623
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2639
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2639
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21b0
movl %ebx, %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x264e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2667
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: SplitStringToVect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int SplitStringToVect(const string& srcStr, vector<string>& destVect, const string& strFlag)
{
	int pos = srcStr.find(strFlag, 0);
	int startPos = 0;
	int splitN = pos;
	string lineText(strFlag);

	while (pos > -1)
	{
		lineText = srcStr.substr(startPos, splitN);
		startPos = pos + 1;
		pos = srcStr.find(strFlag, pos + 1);
		splitN = pos - startPos;
		destVect.push_back(lineText);
	}

	lineText = srcStr.substr(startPos, srcStr.length() - startPos);
	destVect.push_back(lineText);

	return destVect.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, (%rsp)
movq %rdi, %r14
movq (%rdx), %rsi
movq 0x8(%rdx), %rcx
xorl %r13d, %r13d
xorl %edx, %edx
callq 0x22c0
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x3674
leaq 0x28(%rsp), %rbp
movl %ebx, %r12d
movl %r13d, %edx
testl %ebx, %ebx
js 0x272f
movslq %r12d, %rcx
movq %rbp, %rdi
movq %r14, %rsi
callq 0x21d0
leaq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x2210
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x26fe
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21b0
movl %ebx, %r13d
incl %r13d
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
movq %r13, %rdx
callq 0x22c0
movq %rax, %rbx
movl %ebx, %r12d
subl %r13d, %r12d
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3464
jmp 0x26c0
movq 0x8(%r14), %rcx
subq %rdx, %rcx
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x21d0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0x2210
movq (%rbx), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x276f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x8(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x3464
movq (%rbx), %r14
movq 0x8(%rbx), %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x27a3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
subq %r14, %rbx
shrq $0x5, %rbx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27c1
jmp 0x27c1
jmp 0x27c1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x27e0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: MyPaser::Program::GetFuncNameFromStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int MyPaser::Program::GetFuncNameFromStr(const string& context) {
	vector<string> lines;
	lines.clear();
	SplitStringToVect(context, lines, "\n");

	for (auto &l : lines) {
		if (l.find("g     F .text") != string::npos) {
			int pos = l.find_last_of(" ");
			string funcName = l.substr(pos + 1, l.size() - pos);
			//cout << l << ":" << funcName << endl;
			//cout << funcName << endl;
			this->funcName_.push_back(funcName);
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x28(%rsp), %r15
testq %r15, %r15
je 0x284d
movl $0x10, %r12d
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x2833
movq (%r12), %rsi
incq %rsi
callq 0x21b0
leaq 0x20(%r12), %rax
addq $0x10, %r12
cmpq %r15, %r12
movq %rax, %r12
jne 0x281d
movq $0x0, 0x28(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x27f7(%rip), %rsi      # 0x5054
leaq 0x27f1(%rip), %rdx      # 0x5055
movq %rsp, %rdi
callq 0x3796
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %r14, %rdi
callq 0x266f
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2897
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %rbp
cmpq %rbp, %r14
je 0x2933
leaq 0x27a7(%rip), %r15      # 0x5058
leaq 0x27ae(%rip), %r12      # 0x5066
movq %rsp, %r13
movl $0xd, %ecx
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x22c0
cmpq $-0x1, %rax
je 0x292a
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %rsi
movq $-0x1, %rdx
callq 0x2320
leal 0x1(%rax), %ecx
movslq %ecx, %rdx
movq 0x8(%r14), %rcx
cltq
subq %rax, %rcx
movq %r13, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3464
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x292a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21b0
addq $0x20, %r14
cmpq %rbp, %r14
jne 0x28bb
leaq 0x20(%rsp), %rdi
callq 0x34a2
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2957
jmp 0x2952
movq %rax, %rbx
jmp 0x2975
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2975
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x20(%rsp), %rdi
callq 0x34a2
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: SplitDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string SplitDirectory(string fulldir) {
	int pos = fulldir.find_last_of("/");
	//cout << pos << endl;
	if (pos == string::npos) {
		return fulldir;
	}
	else {
		return fulldir.substr(pos+1, fulldir.size() - pos);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x23e9(%rip), %rsi      # 0x506b
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x2320
shlq $0x20, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jne 0x2cc8
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x2cf4
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x2cfa
movq %rax, %rsi
sarq $0x20, %rsi
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rax, %rdx
sarq $0x20, %rdx
movq 0x8(%r14), %rcx
subq %rsi, %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
jmp 0x2d12
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: MyPaser::Program::PrintfFuncOptoFile(char const*)
void MyPaser::Program::PrintfFuncOptoFile(const char* filename) {
	FILE* f = fopen(filename, "w");
	for (auto &name : this->funcName_) {
		fprintf(f, "[%s]:\n", name.c_str());
		for (auto &op : this->functOp_[name]) {
			fprintf(f, "%s,", op.c_str());
		}
		fprintf(f, "\n");
	}
	fclose(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x2337(%rip), %rsi      # 0x506d
movq %rax, %rdi
callq 0x21f0
movq %rax, %r14
movq (%rbx), %r15
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
cmpq %rax, %r15
je 0x2db5
addq $0x18, %rbx
leaq 0x231a(%rip), %r13      # 0x5076
movq (%r15), %rdx
movq %r14, %rdi
leaq 0x2306(%rip), %rsi      # 0x506f
xorl %eax, %eax
callq 0x2250
movq %rbx, %rdi
movq %r15, %rsi
callq 0x34fe
movq (%rax), %r12
movq 0x8(%rax), %rbp
cmpq %rbp, %r12
je 0x2d9e
movq (%r12), %rdx
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x2250
addq $0x20, %r12
jmp 0x2d82
movl $0xa, %edi
movq %r14, %rsi
callq 0x2220
addq $0x20, %r15
cmpq (%rsp), %r15
jne 0x2d5c
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2190
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: MyPaser::FuncCompare(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
int MyPaser::FuncCompare(vector<string>& a, vector<string>& b) {

	/*
	for (auto& i : a) {
		cout << i << ",";
	}
	cout << endl;
	for (auto& i : b) {
		cout << i << ",";
	}
	cout << endl;
	//*/

	int ans = 0;
	int w = (int)((double)a.size() * 3.0 / 2.0);
	int na = a.size();
	int nb = b.size();
	vector<string> c; c.clear();
	for (int k = 0; k < nb; k++) {
		if (k + 1 + w < nb) {
			c.assign(b.begin() + k, b.begin() + k + w + 1);
		}
		else {
			c.assign(b.begin() + k, b.end());
		}
		int tmp = LCS(a, c);
		ans = max(ans, tmp);
	}
	return ans;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x30(%rsp)
movq 0x8(%rdi), %rbx
movq %rdi, 0x28(%rsp)
subq (%rdi), %rbx
movq 0x8(%rsi), %r12
subq (%rsi), %r12
shrq $0x5, %r12
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x3072
movl $0x10, %r15d
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x3059
movq (%r15), %rsi
incq %rsi
callq 0x21b0
leaq 0x20(%r15), %rax
addq $0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x3045
movq $0x0, 0x8(%rsp)
testl %r12d, %r12d
jle 0x3143
sarq $0x5, %rbx
movq %rbx, %xmm0
punpckldq 0x1f84(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1f8c(%rip), %xmm0     # 0x5020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x1f88(%rip), %xmm1     # 0x5030
mulsd 0x1f88(%rip), %xmm1     # 0x5038
cvttsd2si %xmm1, %eax
cltq
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq %r12, %rcx
subq %rax, %rcx
movq %rcx, 0x20(%rsp)
shlq $0x5, %rax
addq $0x20, %rax
movq %rax, 0x18(%rsp)
negq %r12
xorl %r14d, %r14d
movl $0x1, %r13d
movq %rsp, %r15
xorl %ebx, %ebx
movq 0x30(%rsp), %rax
movq (%rax), %rdx
leaq (%rdx,%r14), %rsi
cmpq 0x20(%rsp), %r13
jge 0x310b
addq 0x18(%rsp), %rdx
addq %r14, %rdx
movq %r15, %rdi
callq 0x3de4
jmp 0x3117
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x3de4
movq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x2dcb
movl %eax, %ebp
cmpl %eax, %ebx
cmovgl %ebx, %ebp
addq $0x20, %r14
leaq (%r12,%r13), %rax
incq %rax
incq %r13
movl %ebp, %ebx
cmpq $0x1, %rax
jne 0x30e6
jmp 0x3145
xorl %ebp, %ebp
movq %rsp, %rdi
callq 0x34a2
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3162
jmp 0x3162
movq %rax, %rbx
movq %rsp, %rdi
callq 0x34a2
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/mxy161610207[P]codesim/src/MyPaser.cpp
// Function: MyPaser::Compare(MyPaser::Program&, MyPaser::Program&)
double MyPaser::PaserCompare(char* filename1, char* filename2) {
	MyPaser::Program A;
	MyPaser::Program B;

	if (TouchFile(filename1) && TouchFile(filename2)) {
		GetFuncList(filename1, A);
		GetFuncList(filename2, B);

		return max(Compare(A, B), Compare(B, A));
		//9return  Compare(A, B);

		//printf("%s\n", filename1);
		//string s = SplitDirectory(filename1);
		//printf("%s\n", s.c_str());
	}
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0x48(%rsp), %rdi
callq 0x357a
movq %rsp, %rdi
callq 0x357a
movq %rbx, %rdi
callq 0x24dc
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3660
movq %rsp, %rdi
callq 0x34a2
leaq 0x60(%rsp), %rdi
callq 0x3660
leaq 0x48(%rsp), %rdi
callq 0x34a2
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/lhartmann[P]orangepi-i2s-steppers/cnt.cpp
// Function: main
int main() {
	uint32_t buff[1024];
	while (true) {
		for (uint32_t i=0; i<1024; ++i) {
			buff[i] = step();
		}
		write(STDOUT_FILENO, buff, sizeof(buff));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
xorl %r14d, %r14d
leaq -0x1010(%rbp), %rbx
callq 0x113c
movl %eax, -0x1010(%rbp,%r14,4)
incq %r14
cmpq $0x400, %r14            # imm = 0x400
jne 0x12d5
movl $0x1000, %edx           # imm = 0x1000
movl $0x1, %edi
movq %rbx, %rsi
callq 0x1030
xorl %r14d, %r14d
jmp 0x12d5
nop
// File: /workspace/github_cpp_makefile_star2_O1/lhartmann[P]orangepi-i2s-steppers/./throttle.h
// Function: Throttle::step()
bool step() {
        if (paused) {
            // On pause, decelerate gracefully to zero.
            if (r) r--;
        } else {
            // If before brake point
            if (n<n1) {
                // Then accelerate to max-speed
                if (r < rd) r++;
            } else {
                // Otherwise decelerate to end-speed
                if (r > r1) r--;

                // On resume, accelerate to end-speed
                if (r < r1) r++;
            }
        }
        acc += r;
        if (acc > 0) {
            acc -= rd;
            if (n < N) n++;
            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x1, 0x20(%rdi)
jne 0x131b
movl 0x18(%rdi), %eax
testl %eax, %eax
je 0x1344
decl %eax
jmp 0x1341
movl (%rdi), %ecx
movl 0x18(%rdi), %eax
cmpl 0x4(%rdi), %ecx
jae 0x132c
cmpl 0xc(%rdi), %eax
jb 0x133f
jmp 0x1344
movl 0x14(%rdi), %ecx
cmpl %ecx, %eax
jbe 0x1338
decl %eax
movl %eax, 0x18(%rdi)
movl 0x18(%rdi), %eax
cmpl %ecx, %eax
jae 0x1344
incl %eax
movl %eax, 0x18(%rdi)
movl 0x1c(%rdi), %eax
addl 0x18(%rdi), %eax
movl %eax, 0x1c(%rdi)
testl %eax, %eax
jle 0x1364
movl %eax, %ecx
subl 0xc(%rdi), %ecx
movl %ecx, 0x1c(%rdi)
movl (%rdi), %ecx
cmpl 0x8(%rdi), %ecx
jae 0x1364
incl %ecx
movl %ecx, (%rdi)
testl %eax, %eax
setg %al
popq %rbp
retq