// File: /workspace/github_c_makefile_star2_O3/LenShustek[P]miditones/miditones_scroll.c
// Function: print_status
void print_status (void) {
   unsigned gen;
   bool any_instr_changed = false;
   for (gen = 0; gen < num_tonegens; ++gen)
      any_instr_changed |= gen_instrument_changed[gen];
   if (any_instr_changed) {
      if (codeoutput)
         fprintf (outfile, "//");
      fprintf (outfile, "%15s", "");
      for (gen = 0; gen < num_tonegens; ++gen) {
         if (gen_instrument_changed[gen]) {
            gen_instrument_changed[gen] = false;
            fprintf (outfile, "%6s", instrumentname[gen_instrument[gen]]); }
         else
            fprintf (outfile, "%6s", "");
         if (expect_volume && !ignore_volume)
            fprintf (outfile, "%5s", ""); }
      fprintf (outfile, "\n"); }

   if (codeoutput)
      fprintf (outfile, "/*");  // start comment
   // print the current timestamp
   fprintf (outfile, "%7d.%03d ", timenow / 1000, timenow % 1000);
   // print the current status of all tone generators
   for (gen = 0; gen < num_tonegens; ++gen) {
      if (showhex && gen_note[gen] != SILENT)
         fprintf(outfile, " 0x%02X ", gen_note[gen]);
      else fprintf (outfile, "%6s", gen_note[gen] == SILENT ? " " : notename[gen_note[gen]]);
      if (expect_volume && !ignore_volume)
         if (gen_note[gen] == SILENT)
            fprintf (outfile, "     ");
         else
            fprintf (outfile, " v%-3d", gen_volume[gen]); }
   // display the hex commands that created these changes
   fprintf (outfile, "%3u.%03u %c", delay/1000, delay%1000, warning ? '!' : ' ');
   if (showbytestream) fprintf (outfile, "%04X: ", (unsigned int) (lastbufptr - buffer));
   warning = false;
   if (codeoutput)
      fprintf (outfile, "*/ "); // end comment
   if (showbytestream) for (; lastbufptr <= bufptr; ++lastbufptr)
         fprintf (outfile, codeoutput ? "0x%02X," : "%02X ", *lastbufptr);
   fprintf (outfile, "\n");
   lastbufptr = bufptr + 1; }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x4a88(%rip), %eax      # 0x70b0
testq %rax, %rax
je 0x2743
xorl %ecx, %ecx
leaq 0x4ce6(%rip), %r12      # 0x7320
xorl %edx, %edx
andb $0x1, %dl
orb (%rcx,%r12), %dl
incq %rcx
cmpq %rcx, %rax
jne 0x263c
testb %dl, %dl
je 0x2743
cmpb $0x1, 0x4a96(%rip)      # 0x70f0
jne 0x2679
movq 0x4c9d(%rip), %rcx      # 0x7300
leaq 0x1b82(%rip), %rdi      # 0x41ec
movl $0x2, %esi
movl $0x1, %edx
callq 0x2130
movq 0x4c80(%rip), %rdi      # 0x7300
leaq 0x1b68(%rip), %rsi      # 0x41ef
leaq 0x1ebc(%rip), %rdx      # 0x454a
xorl %eax, %eax
callq 0x20b0
cmpl $0x0, 0x4a14(%rip)      # 0x70b0
je 0x2732
leaq 0x4c87(%rip), %r13      # 0x7330
leaq 0x4330(%rip), %rbp      # 0x69e0
leaq 0x1b3d(%rip), %rbx      # 0x41f4
leaq 0x1e8c(%rip), %r15      # 0x454a
xorl %r14d, %r14d
cmpb $0x1, (%r14,%r12)
jne 0x26e2
movb $0x0, (%r14,%r12)
movq 0x4c2c(%rip), %rdi      # 0x7300
movslq (%r13), %rax
movq (%rbp,%rax,8), %rdx
movq %rbx, %rsi
jmp 0x26ef
movq 0x4c17(%rip), %rdi      # 0x7300
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20b0
cmpb $0x1, 0x49f4(%rip)      # 0x70f1
jne 0x2720
cmpb $0x0, 0x49ec(%rip)      # 0x70f2
jne 0x2720
movq 0x4bf1(%rip), %rdi      # 0x7300
leaq 0x1ae2(%rip), %rsi      # 0x41f8
movq %r15, %rdx
xorl %eax, %eax
callq 0x20b0
incq %r14
movl 0x4987(%rip), %eax      # 0x70b0
addq $0x4, %r13
cmpq %rax, %r14
jb 0x26c1
movq 0x4bc7(%rip), %rsi      # 0x7300
movl $0xa, %edi
callq 0x20a0
cmpb $0x1, 0x49a6(%rip)      # 0x70f0
jne 0x2769
movq 0x4bad(%rip), %rcx      # 0x7300
leaq 0x1aa2(%rip), %rdi      # 0x41fc
movl $0x2, %esi
movl $0x1, %edx
callq 0x2130
movq 0x4b90(%rip), %rdi      # 0x7300
movq 0x4971(%rip), %rcx      # 0x70e8
movq %rcx, %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
mulq %rdx
shrq $0x4, %rdx
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
subq %rax, %rcx
leaq 0x1a5f(%rip), %rsi      # 0x41ff
xorl %eax, %eax
callq 0x20b0
cmpl $0x0, 0x4902(%rip)      # 0x70b0
je 0x288a
leaq 0x4bb5(%rip), %r13      # 0x7370
leaq 0x1a54(%rip), %rbp      # 0x4216
leaq 0x1a2b(%rip), %r14      # 0x41f4
leaq 0x2860(%rip), %r15      # 0x5030
xorl %r12d, %r12d
xorl %ebx, %ebx
movslq (%r12,%r13), %rdx
cmpb $0x1, 0x4913(%rip)      # 0x70f3
jne 0x27fe
movq 0x4b17(%rip), %rdi      # 0x7300
cmpl $-0x1, %edx
je 0x2813
leaq 0x1a14(%rip), %rsi      # 0x4209
xorl %eax, %eax
callq 0x20b0
jmp 0x2820
movq 0x4afb(%rip), %rdi      # 0x7300
cmpl $-0x1, %edx
je 0x2813
movslq (%r15,%rdx,4), %rdx
addq %r15, %rdx
jmp 0x2816
movq %rbp, %rdx
movq %r14, %rsi
xorl %eax, %eax
callq 0x20b0
cmpb $0x1, 0x48ca(%rip)      # 0x70f1
jne 0x2874
cmpb $0x0, 0x48c2(%rip)      # 0x70f2
jne 0x2874
cmpl $-0x1, (%r12,%r13)
movq 0x4ac2(%rip), %rcx      # 0x7300
je 0x285e
leaq 0x4b69(%rip), %rax      # 0x73b0
movl (%r12,%rax), %edx
movq %rcx, %rdi
leaq 0x19c3(%rip), %rsi      # 0x4218
xorl %eax, %eax
callq 0x20b0
jmp 0x2874
movl $0x5, %esi
movl $0x1, %edx
leaq 0x19a3(%rip), %rdi      # 0x4212
callq 0x2130
incq %rbx
movl 0x4833(%rip), %eax      # 0x70b0
addq $0x4, %r12
cmpq %rax, %rbx
jb 0x27d5
movq 0x4a6f(%rip), %rdi      # 0x7300
movl 0x4b59(%rip), %ecx      # 0x73f0
imulq $0x10624dd3, %rcx, %rdx # imm = 0x10624DD3
shrq $0x26, %rdx
imull $0x3e8, %edx, %eax      # imm = 0x3E8
subl %eax, %ecx
movzbl 0x482e(%rip), %r8d      # 0x70e0
orl $0x20, %r8d
leaq 0x1962(%rip), %rsi      # 0x421f
xorl %eax, %eax
callq 0x20b0
cmpb $0x1, 0x47e9(%rip)      # 0x70b4
jne 0x28ee
movq 0x4a2c(%rip), %rdi      # 0x7300
movl 0x4b1e(%rip), %edx      # 0x73f8
subl 0x4a28(%rip), %edx      # 0x7308
leaq 0x1944(%rip), %rsi      # 0x422b
xorl %eax, %eax
callq 0x20b0
movb $0x0, 0x47eb(%rip)      # 0x70e0
cmpb $0x1, 0x47f4(%rip)      # 0x70f0
jne 0x291b
movq 0x49fb(%rip), %rcx      # 0x7300
leaq 0x1926(%rip), %rdi      # 0x4232
movl $0x3, %esi
movl $0x1, %edx
callq 0x2130
cmpb $0x1, 0x4792(%rip)      # 0x70b4
jne 0x297b
movq 0x4acd(%rip), %rax      # 0x73f8
cmpq 0x4ace(%rip), %rax      # 0x7400
ja 0x297b
leaq 0x18fb(%rip), %rbx      # 0x4236
leaq 0x18ca(%rip), %r14      # 0x420c
movq 0x49b7(%rip), %rdi      # 0x7300
cmpb $0x0, 0x47a0(%rip)      # 0x70f0
movq %r14, %rsi
cmovneq %rbx, %rsi
movzbl (%rax), %edx
xorl %eax, %eax
callq 0x20b0
movq 0x4a90(%rip), %rax      # 0x73f8
incq %rax
movq %rax, 0x4a86(%rip)      # 0x73f8
cmpq 0x4a87(%rip), %rax      # 0x7400
jbe 0x2942
movq 0x497e(%rip), %rsi      # 0x7300
movl $0xa, %edi
callq 0x20a0
movq 0x4a6d(%rip), %rax      # 0x7400
incq %rax
movq %rax, 0x4a5b(%rip)      # 0x73f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq