// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heather.cpp
// Function: fmt_osc_val(int, char*, double)
void fmt_osc_val(int stat, char *id, double val)
{
char *s;

   if(stat) s = "";
   else if(plot[OSC].show_deriv) s = "*";
   else if(plot[OSC].show_freq) s = "#";
   else if(plot[OSC].drift_rate) s = "=";
   else s = ":";

   if(luxor) {
      if((val >= 100000.0) || (val <= (-10000.0))) {
         if(stat) sprintf(out, "%s%s%8.3f%s", id,s, val, plot[OSC].units);
         else     sprintf(out, "%s%s%7.3f%s", id,s, val, plot[OSC].units);
      }
      else if((val >= 10000.0) || (val <= (-1000.0))) {
         if(stat) sprintf(out, "%s%s%8.3f%s", id,s, val, plot[OSC].units);
         else     sprintf(out, "%s%s%7.3f%s", id,s, val, plot[OSC].units);
      }
      else if((val >= 1000.0) || (val <= (-100.0))) {
         if(stat) sprintf(out, "%s%s%8.3f%s", id,s, val, plot[OSC].units);
         else     sprintf(out, "%s%s%7.3f%s", id,s, val, plot[OSC].units);
      }
      else {
         if(stat) sprintf(out, "%s%s%8.3f%s", id,s, val, plot[OSC].units);
         else     sprintf(out, "%s%s%7.3f%s", id,s, val, plot[OSC].units);
      }
   }
   else if(rcvr_type == CS_RCVR) {
      if((val >= 100.0) || (val <= (-10.0))) {
         sprintf(out, "%s%s%6.1f%s", id,s, val, ppt_string);
      }
      else if((val >= 10.0) || (val <= (-1.0))) {
         sprintf(out, "%s%s%6.2f%s", id,s, val, ppt_string);
      }
      else {
         sprintf(out, "%s%s%6.3f%s", id,s, val, ppt_string);
      }
   }
   else if((rcvr_type == TICC_RCVR) || (rcvr_type == ZODIAC_RCVR)) {
      if((val >= 100000.0) || (val <= (-10000.0))) {
         sprintf(out, "%s%s%9.1f%s", id,s, val, ppt_string);
      }
      else if((val >= 10000.0) || (val <= (-1000.0))) {
         sprintf(out, "%s%s%9.2f%s", id,s, val, ppt_string);
      }
      else if((val >= 1000.0) || (val <= (-100.0))) {
         sprintf(out, "%s%s%9.3f%s", id,s, val, ppt_string);
      }
      else if((val >= 100.0) || (val <= (-10.0))) {
         sprintf(out, "%s%s%9.4f%s", id,s, val, ppt_string);
      }
      else if((val >= 10.0) || (val <= (-1.0))) {
         sprintf(out, "%s%s%9.5f%s", id,s, val, ppt_string);
      }
      else {
         sprintf(out, "%s%s%9.6f%s", id,s, val, ppt_string);
      }
   }
   else if((rcvr_type == VENUS_RCVR) && saw_venus_raw) {
      sprintf(out, "%s%s%.5f %s", id,s, val, plot[OSC].units);
   }
   else if(TIMING_RCVR) {
      if((val >= 100000.0) || (val <= (-10000.0))) {
         sprintf(out, "%s%s%11.3f%s", id,s, val, ppt_string);
      }
      else if((val >= 10000.0) || (val <= (-1000.0))) {
         sprintf(out, "%s%s%11.4f%s", id,s, val, ppt_string);
      }
      else if((val >= 1000.0) || (val <= (-100.0))) {
         sprintf(out, "%s%s%11.5f%s", id,s, val, ppt_string);
      }
      else if((val >= 100.0) || (val <= (-10.0))) {
         sprintf(out, "%s%s%11.6f%s", id,s, val, ppt_string);
      }
      else if((val >= 10.0) || (val <= (-1.0))) {
         sprintf(out, "%s%s%11.7f%s", id,s, val, ppt_string);
      }
      else {
         sprintf(out, "%s%s%11.8f%s", id,s, val, ppt_string);
      }
   }
   else if(rcvr_type == X72_RCVR) {  // xxxxx
      sprintf(out, "%s%s%.5g %s", id,s, val, plot[OSC].units);
   }
   else {
      val *= 1000.0;

      if((val >= 100000.0) || (val <= (-10000.0))) {
         sprintf(out, "%s%s%11.3f%s", id,s, val, ppt_string);
      }
      else if((val >= 10000.0) || (val <= (-1000.0))) {
         sprintf(out, "%s%s%11.4f%s", id,s, val, ppt_string);
      }
      else if((val >= 1000.0) || (val <= (-100.0))) {
         sprintf(out, "%s%s%11.5f%s", id,s, val, ppt_string);
      }
      else if((val >= 100.0) || (val <= (-10.0))) {
         sprintf(out, "%s%s%11.6f%s", id,s, val, ppt_string);
      }
      else if((val >= 10.0) || (val <= (-1.0))) {
         sprintf(out, "%s%s%11.7f%s", id,s, val, ppt_string);
      }
      else {
         sprintf(out, "%s%s%11.8f%s", id,s, val, ppt_string);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rdx
testl %edi, %edi
je 0x13580
leaq 0x11e428(%rip), %rcx    # 0x1319a6
jmp 0x135c6
cmpl $0x0, 0x14a95d(%rip)    # 0x15dee4
je 0x13592
leaq 0x108182(%rip), %rcx    # 0x11b712
jmp 0x135c6
cmpl $0x0, 0x14a94f(%rip)    # 0x15dee8
je 0x135a4
leaq 0xf9ea2(%rip), %rcx     # 0x10d444
jmp 0x135c6
xorpd %xmm1, %xmm1
ucomisd 0x14a908(%rip), %xmm1   # 0x15deb8
leaq 0xfa308(%rip), %rax     # 0x10d8bf
leaq 0x112866(%rip), %rcx    # 0x125e24
cmovneq %rax, %rcx
cmovpq %rax, %rcx
cmpb $0x0, 0x22b971(%rip)    # 0x23ef3e
je 0x13640
ucomisd 0xf5af1(%rip), %xmm0    # 0x1090c8
jae 0x1361e
movsd 0xf5aef(%rip), %xmm1    # 0x1090d0
ucomisd %xmm0, %xmm1
jae 0x1361e
ucomisd 0xf5ae9(%rip), %xmm0    # 0x1090d8
jae 0x1361e
movsd 0xf5ae7(%rip), %xmm1    # 0x1090e0
ucomisd %xmm0, %xmm1
jae 0x1361e
ucomisd 0xf5a31(%rip), %xmm0    # 0x109038
movq 0x14a812(%rip), %r8     # 0x15de20
jae 0x13625
movsd 0xf5ad0(%rip), %xmm1    # 0x1090e8
ucomisd %xmm0, %xmm1
jmp 0x13625
movq 0x14a7fb(%rip), %r8     # 0x15de20
testl %edi, %edi
je 0x136c1
leaq 0x328bec(%rip), %rdi    # 0x33c220
leaq 0xf6d46(%rip), %rsi     # 0x10a381
jmp 0x13a2f
movq 0x205289(%rip), %rax    # 0x2188d0
cmpq $0x100, %rax            # imm = 0x100
je 0x136d4
cmpq $0x10000, %rax          # imm = 0x10000
je 0x136d4
cmpq $0x20000, %rax          # imm = 0x20000
jne 0x137a8
ucomisd 0xf59f1(%rip), %xmm0    # 0x109060
jae 0x137ed
movsd 0xf5a73(%rip), %xmm1    # 0x1090f0
ucomisd %xmm0, %xmm1
jae 0x137ed
ucomisd 0xf5a19(%rip), %xmm0    # 0x1090a8
movq 0x32bf8a(%rip), %r8     # 0x33f620
jae 0x13912
movsd 0xf5a54(%rip), %xmm1    # 0x1090f8
ucomisd %xmm0, %xmm1
jae 0x13912
leaq 0x328b6b(%rip), %rdi    # 0x33c220
leaq 0xf6cf5(%rip), %rsi     # 0x10a3b1
jmp 0x13a2f
leaq 0x328b58(%rip), %rdi    # 0x33c220
leaq 0xf6cbe(%rip), %rsi     # 0x10a38d
jmp 0x13a2f
ucomisd 0xf59ec(%rip), %xmm0    # 0x1090c8
jae 0x1378e
movsd 0xf59e6(%rip), %xmm1    # 0x1090d0
ucomisd %xmm0, %xmm1
jae 0x1378e
ucomisd 0xf59dc(%rip), %xmm0    # 0x1090d8
jae 0x137d3
movsd 0xf59d6(%rip), %xmm1    # 0x1090e0
ucomisd %xmm0, %xmm1
jae 0x137d3
ucomisd 0xf591c(%rip), %xmm0    # 0x109038
jae 0x138f8
movsd 0xf59be(%rip), %xmm1    # 0x1090e8
ucomisd %xmm0, %xmm1
jae 0x138f8
ucomisd 0xf5924(%rip), %xmm0    # 0x109060
jae 0x1393f
movsd 0xf59a6(%rip), %xmm1    # 0x1090f0
ucomisd %xmm0, %xmm1
jae 0x1393f
ucomisd 0xf594c(%rip), %xmm0    # 0x1090a8
movq 0x32bebd(%rip), %r8     # 0x33f620
jae 0x139d6
movsd 0xf5987(%rip), %xmm1    # 0x1090f8
ucomisd %xmm0, %xmm1
jae 0x139d6
leaq 0x328a9e(%rip), %rdi    # 0x33c220
leaq 0xf6c70(%rip), %rsi     # 0x10a3f9
jmp 0x13a2f
movq 0x32be8b(%rip), %r8     # 0x33f620
leaq 0x328a84(%rip), %rdi    # 0x33c220
leaq 0xf6c1a(%rip), %rsi     # 0x10a3bd
jmp 0x13a2f
cmpq $0x80, %rax
jne 0x13807
cmpl $0x0, 0x32a63d(%rip)    # 0x33ddf4
je 0x13807
movq 0x14a660(%rip), %r8     # 0x15de20
leaq 0x328a59(%rip), %rdi    # 0x33c220
leaq 0xf6c37(%rip), %rsi     # 0x10a405
jmp 0x13a2f
movq 0x32be46(%rip), %r8     # 0x33f620
leaq 0x328a3f(%rip), %rdi    # 0x33c220
leaq 0xf6be1(%rip), %rsi     # 0x10a3c9
jmp 0x13a2f
movq 0x32be2c(%rip), %r8     # 0x33f620
leaq 0x328a25(%rip), %rdi    # 0x33c220
leaq 0xf6b97(%rip), %rsi     # 0x10a399
jmp 0x13a2f
cmpb $0x0, 0x2050f6(%rip)    # 0x218904
jne 0x1383e
cmpq $0x1, %rax
sete %dil
movl 0x2077b6(%rip), %esi    # 0x21afd4
cmpl $0x41, %esi
sete %r8b
andb %dil, %r8b
movl 0x2050ca(%rip), %edi    # 0x2188f8
cmpl $0x47, %edi
sete %r9b
testb %r9b, %r8b
je 0x13973
ucomisd 0xf5882(%rip), %xmm0    # 0x1090c8
jae 0x13925
movsd 0xf587c(%rip), %xmm1    # 0x1090d0
ucomisd %xmm0, %xmm1
jae 0x13925
ucomisd 0xf5872(%rip), %xmm0    # 0x1090d8
jae 0x13959
movsd 0xf586c(%rip), %xmm1    # 0x1090e0
ucomisd %xmm0, %xmm1
jae 0x13959
ucomisd 0xf57b2(%rip), %xmm0    # 0x109038
jae 0x139e6
movsd 0xf5854(%rip), %xmm1    # 0x1090e8
ucomisd %xmm0, %xmm1
jae 0x139e6
ucomisd 0xf57ba(%rip), %xmm0    # 0x109060
jae 0x139fd
movsd 0xf583c(%rip), %xmm1    # 0x1090f0
ucomisd %xmm0, %xmm1
jae 0x139fd
ucomisd 0xf57e2(%rip), %xmm0    # 0x1090a8
movq 0x32bd53(%rip), %r8     # 0x33f620
jae 0x13a21
movsd 0xf581d(%rip), %xmm1    # 0x1090f8
ucomisd %xmm0, %xmm1
jae 0x13a21
leaq 0x328934(%rip), %rdi    # 0x33c220
leaq 0xf6b5f(%rip), %rsi     # 0x10a452
jmp 0x13a2f
movq 0x32bd21(%rip), %r8     # 0x33f620
leaq 0x32891a(%rip), %rdi    # 0x33c220
leaq 0xf6ac8(%rip), %rsi     # 0x10a3d5
jmp 0x13a2f
leaq 0x328907(%rip), %rdi    # 0x33c220
leaq 0xf6a85(%rip), %rsi     # 0x10a3a5
jmp 0x13a2f
movq 0x32bcf4(%rip), %r8     # 0x33f620
leaq 0x3288ed(%rip), %rdi    # 0x33c220
leaq 0xf6ad7(%rip), %rsi     # 0x10a411
jmp 0x13a2f
movq 0x32bcda(%rip), %r8     # 0x33f620
leaq 0x3288d3(%rip), %rdi    # 0x33c220
leaq 0xf6a8d(%rip), %rsi     # 0x10a3e1
jmp 0x13a2f
movq 0x32bcc0(%rip), %r8     # 0x33f620
leaq 0x3288b9(%rip), %rdi    # 0x33c220
leaq 0xf6ab0(%rip), %rsi     # 0x10a41e
jmp 0x13a2f
testb %r8b, %r8b
je 0x1398a
cmpl $0x33, %edi
je 0x1383e
cmpl $0x47, %edi
je 0x1383e
cmpl $0x41, %esi
sete %dil
cmpq $0x1, %rax
sete %r8b
cmpl $0x50, %esi
sete %sil
testl $0x800009e4, %eax       # imm = 0x800009E4
jne 0x1383e
orb %sil, %dil
andb %dil, %r8b
jne 0x1383e
cmpq $0x2000000, %rax        # imm = 0x2000000
jne 0x13a14
movq 0x14a45a(%rip), %r8     # 0x15de20
leaq 0x328853(%rip), %rdi    # 0x33c220
leaq 0xf6a8b(%rip), %rsi     # 0x10a45f
jmp 0x13a2f
leaq 0x328843(%rip), %rdi    # 0x33c220
leaq 0xf6a09(%rip), %rsi     # 0x10a3ed
jmp 0x13a2f
movq 0x32bc33(%rip), %r8     # 0x33f620
leaq 0x32882c(%rip), %rdi    # 0x33c220
leaq 0xf6a30(%rip), %rsi     # 0x10a42b
jmp 0x13a2f
movq 0x32bc1c(%rip), %r8     # 0x33f620
leaq 0x328815(%rip), %rdi    # 0x33c220
leaq 0xf6a26(%rip), %rsi     # 0x10a438
jmp 0x13a2f
mulsd 0xf561c(%rip), %xmm0    # 0x109038
jmp 0x1383e
leaq 0x3287f8(%rip), %rdi    # 0x33c220
leaq 0xf6a16(%rip), %rsi     # 0x10a445
movb $0x1, %al
popq %rbp
jmp 0x9060