// File: /workspace/github_c_makefile_star2_O1/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 0x4a7a(%rip), %eax      # 0x70b0
testq %rax, %rax
je 0x2751
xorl %ecx, %ecx
leaq 0x4cd8(%rip), %r12      # 0x7320
xorl %edx, %edx
andb $0x1, %dl
orb (%rcx,%r12), %dl
incq %rcx
cmpq %rcx, %rax
jne 0x264a
testb %dl, %dl
je 0x2751
cmpb $0x1, 0x4a88(%rip)      # 0x70f0
jne 0x2687
movq 0x4c8f(%rip), %rcx      # 0x7300
leaq 0x1b74(%rip), %rdi      # 0x41ec
movl $0x2, %esi
movl $0x1, %edx
callq 0x2130
movq 0x4c72(%rip), %rdi      # 0x7300
leaq 0x1b5a(%rip), %rsi      # 0x41ef
leaq 0x1eae(%rip), %rdx      # 0x454a
xorl %eax, %eax
callq 0x20b0
cmpl $0x0, 0x4a06(%rip)      # 0x70b0
je 0x2740
leaq 0x4c79(%rip), %r13      # 0x7330
leaq 0x4322(%rip), %rbp      # 0x69e0
leaq 0x1b2f(%rip), %rbx      # 0x41f4
leaq 0x1e7e(%rip), %r15      # 0x454a
xorl %r14d, %r14d
cmpb $0x1, (%r14,%r12)
jne 0x26f0
movb $0x0, (%r14,%r12)
movq 0x4c1e(%rip), %rdi      # 0x7300
movslq (%r13), %rax
movq (%rbp,%rax,8), %rdx
movq %rbx, %rsi
jmp 0x26fd
movq 0x4c09(%rip), %rdi      # 0x7300
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x20b0
cmpb $0x1, 0x49e6(%rip)      # 0x70f1
jne 0x272e
cmpb $0x0, 0x49de(%rip)      # 0x70f2
jne 0x272e
movq 0x4be3(%rip), %rdi      # 0x7300
leaq 0x1ad4(%rip), %rsi      # 0x41f8
movq %r15, %rdx
xorl %eax, %eax
callq 0x20b0
incq %r14
movl 0x4979(%rip), %eax      # 0x70b0
addq $0x4, %r13
cmpq %rax, %r14
jb 0x26cf
movq 0x4bb9(%rip), %rsi      # 0x7300
movl $0xa, %edi
callq 0x20a0
cmpb $0x1, 0x4998(%rip)      # 0x70f0
jne 0x2777
movq 0x4b9f(%rip), %rcx      # 0x7300
leaq 0x1a94(%rip), %rdi      # 0x41fc
movl $0x2, %esi
movl $0x1, %edx
callq 0x2130
movq 0x4b82(%rip), %rdi      # 0x7300
movq 0x4963(%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 0x1a51(%rip), %rsi      # 0x41ff
xorl %eax, %eax
callq 0x20b0
cmpl $0x0, 0x48f4(%rip)      # 0x70b0
je 0x289b
leaq 0x4ba7(%rip), %r13      # 0x7370
leaq 0x1a46(%rip), %rbp      # 0x4216
leaq 0x1a1d(%rip), %r14      # 0x41f4
leaq 0x2852(%rip), %r15      # 0x5030
xorl %r12d, %r12d
xorl %ebx, %ebx
cmpb $0x1, 0x4909(%rip)      # 0x70f3
jne 0x280c
movl (%r12,%r13), %edx
cmpl $-0x1, %edx
je 0x280c
movq 0x4b04(%rip), %rdi      # 0x7300
leaq 0x1a06(%rip), %rsi      # 0x4209
xorl %eax, %eax
callq 0x20b0
jmp 0x2831
movslq (%r12,%r13), %rax
movq %rbp, %rdx
cmpq $-0x1, %rax
je 0x2820
movslq (%r15,%rax,4), %rdx
addq %r15, %rdx
movq 0x4ad9(%rip), %rdi      # 0x7300
movq %r14, %rsi
xorl %eax, %eax
callq 0x20b0
cmpb $0x1, 0x48b9(%rip)      # 0x70f1
jne 0x2885
cmpb $0x0, 0x48b1(%rip)      # 0x70f2
jne 0x2885
cmpl $-0x1, (%r12,%r13)
movq 0x4ab1(%rip), %rcx      # 0x7300
je 0x286f
leaq 0x4b58(%rip), %rax      # 0x73b0
movl (%r12,%rax), %edx
movq %rcx, %rdi
leaq 0x19b2(%rip), %rsi      # 0x4218
xorl %eax, %eax
callq 0x20b0
jmp 0x2885
movl $0x5, %esi
movl $0x1, %edx
leaq 0x1992(%rip), %rdi      # 0x4212
callq 0x2130
incq %rbx
movl 0x4822(%rip), %eax      # 0x70b0
addq $0x4, %r12
cmpq %rax, %rbx
jb 0x27e3
movq 0x4a5e(%rip), %rdi      # 0x7300
movl 0x4b48(%rip), %ecx      # 0x73f0
imulq $0x10624dd3, %rcx, %rdx # imm = 0x10624DD3
shrq $0x26, %rdx
imull $0x3e8, %edx, %eax      # imm = 0x3E8
subl %eax, %ecx
movzbl 0x481d(%rip), %r8d      # 0x70e0
orl $0x20, %r8d
leaq 0x1951(%rip), %rsi      # 0x421f
xorl %eax, %eax
callq 0x20b0
cmpb $0x1, 0x47d8(%rip)      # 0x70b4
jne 0x28ff
movq 0x4a1b(%rip), %rdi      # 0x7300
movl 0x4b0d(%rip), %edx      # 0x73f8
subl 0x4a17(%rip), %edx      # 0x7308
leaq 0x1933(%rip), %rsi      # 0x422b
xorl %eax, %eax
callq 0x20b0
movb $0x0, 0x47da(%rip)      # 0x70e0
cmpb $0x1, 0x47e3(%rip)      # 0x70f0
jne 0x292c
movq 0x49ea(%rip), %rcx      # 0x7300
leaq 0x1915(%rip), %rdi      # 0x4232
movl $0x3, %esi
movl $0x1, %edx
callq 0x2130
cmpb $0x1, 0x4781(%rip)      # 0x70b4
jne 0x298c
movq 0x4abc(%rip), %rax      # 0x73f8
cmpq 0x4abd(%rip), %rax      # 0x7400
ja 0x298c
leaq 0x18ea(%rip), %rbx      # 0x4236
leaq 0x18b9(%rip), %r14      # 0x420c
movq 0x49a6(%rip), %rdi      # 0x7300
cmpb $0x0, 0x478f(%rip)      # 0x70f0
movq %r14, %rsi
cmovneq %rbx, %rsi
movzbl (%rax), %edx
xorl %eax, %eax
callq 0x20b0
movq 0x4a7f(%rip), %rax      # 0x73f8
incq %rax
movq %rax, 0x4a75(%rip)      # 0x73f8
cmpq 0x4a76(%rip), %rax      # 0x7400
jbe 0x2953
movq 0x496d(%rip), %rsi      # 0x7300
movl $0xa, %edi
callq 0x20a0
movq 0x4a5c(%rip), %rax      # 0x7400
incq %rax
movq %rax, 0x4a4a(%rip)      # 0x73f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq