// File: /workspace/github_c_makefile_star2_O2/pahihu[P]mixal/run.c
// Function: print_CPU_trace
void print_CPU_trace(Flag header)
{
    Byte I = 0;
    Cell instruction;
    const char *mnemo;
    
    IGNORE_VALUE(I);

    if (header) {
        printf ("  LOC FREQ INSTRUCTION OP    OPERAND   |  REGISTER A  REGISTER X  RI1   RI2   RI3   RI4   RI5   RI6   RJ   VCS   TYME\n");
        // printf ("+1000 0001 +1234567890 JBUS +1234567890| +1234567890 +1234567890 +0000 +0000 +0000 +0000 +0000 +0000 +1007 XEC 00014435\n");
        return;
    }

    instruction = safe_fetch(pc);
    destructure_cell(instruction, M, I, F, C);
    print_pc();
    printf (" %04d ", fetch_frequency(pc));
    print_cell (instruction);
    mnemo = mnemonic (C, F);
    printf (" %-4s ", mnemo);
    print_cell (M);
    printf ("| ");
    print_cell (r[A]);
    printf (" ");
    print_cell (r[X]);
    {
        unsigned i;
        for (i = 1; i <= 6; ++i)
        printf (" %s", index_to_string (r[i]));
    }
    printf (" %s", index_to_string (r[J]));
    printf (" %c%c%c ", " X"[overflow ? 1: 0],
               "LEG"[1 + SIGN(comparison_indicator)],
                        " C"[control_state == internal_state ? 1 : 0]);
    printf (" %08lu\n", elapsed_time);
}

// Assembly:
testl %edi, %edi
je 0x6b2d
leaq 0x38c2(%rip), %rdi      # 0xa3ea
jmp 0x30b0
pushq %r15
pushq %r14
pushq %rbx
movl 0xa278(%rip), %edi      # 0x10db0
callq 0x6ce5
movq %rax, %rbx
andl $0x40000000, %eax       # imm = 0x40000000
movl %ebx, %ecx
andl $0x3f, %ecx
movl %ecx, 0xa298(%rip)      # 0x10de8
movl %ebx, %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movl %ecx, 0xa28e(%rip)      # 0x10dec
movl %ebx, %ecx
shrl $0x12, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
orq %rax, %rcx
movq %rcx, 0xa27d(%rip)      # 0x10df0
callq 0x686d
movslq 0xa231(%rip), %rax      # 0x10db0
movl %eax, %ecx
negl %ecx
shlq $0x2, %rcx
addq 0xa342(%rip), %rcx      # 0x10ed0
leaq (,%rax,4), %rdx
addq 0xa23b(%rip), %rdx      # 0x10dd8
testq %rax, %rax
cmovsq %rcx, %rdx
movl (%rdx), %esi
leaq 0x3250(%rip), %rdi      # 0x9dfd
xorl %eax, %eax
callq 0x3120
movq %rbx, %rdi
callq 0x3d5f
movl 0xa226(%rip), %edi      # 0x10de8
movl 0xa224(%rip), %esi      # 0x10dec
callq 0x6acb
leaq 0x3230(%rip), %rdi      # 0x9e04
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movq 0xa20b(%rip), %rdi      # 0x10df0
callq 0x3d5f
leaq 0x321a(%rip), %rdi      # 0x9e0b
xorl %eax, %eax
callq 0x3120
movq 0xa161(%rip), %rdi      # 0x10d60
callq 0x3d5f
pushq $0x20
popq %rdi
callq 0x3050
movq 0xa185(%rip), %rdi      # 0x10d98
callq 0x3d5f
pushq $0x1
popq %r14
leaq 0xa13d(%rip), %r15      # 0x10d60
leaq 0x3916(%rip), %rbx      # 0xa540
cmpq $0x7, %r14
je 0x6c4b
movq (%r15,%r14,8), %rdi
callq 0x3dc7
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
incq %r14
jmp 0x6c2a
movq 0xa14e(%rip), %rdi      # 0x10da0
callq 0x3dc7
leaq 0x38e2(%rip), %rdi      # 0xa540
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movl 0xa0d6(%rip), %eax      # 0x10d44
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
incq %rcx
testl %eax, %eax
leaq 0x8ebf(%rip), %rax      # 0xfb40
movl $0x0, %edx
cmovnsq %rcx, %rdx
cmpl $0x1, (%rax)
leaq 0x3183(%rip), %rax      # 0x9e17
sbbq $-0x1, %rax
movsbl (%rax), %esi
leaq 0x3178(%rip), %rax      # 0x9e1a
xorl %ecx, %ecx
cmpl $0x1, 0xa09d(%rip)      # 0x10d48
movsbl (%rdx,%rax), %edx
sete %cl
leaq 0x3165(%rip), %rax      # 0x9e1e
movsbl (%rcx,%rax), %ecx
leaq 0x314a(%rip), %rdi      # 0x9e0e
xorl %eax, %eax
callq 0x3120
movq 0xa05e(%rip), %rsi      # 0x10d30
leaq 0x3148(%rip), %rdi      # 0x9e21
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x3120