// File: /workspace/github_c_makefile_star2_O3/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 0x6f59
leaq 0x3496(%rip), %rdi      # 0xa3ea
jmp 0x30b0
pushq %r15
pushq %r14
pushq %rbx
movl 0x9e4c(%rip), %edi      # 0x10db0
callq 0x712a
movq %rax, %rbx
andl $0x40000000, %eax       # imm = 0x40000000
movl %ebx, %ecx
andl $0x3f, %ecx
movl %ecx, 0x9e6c(%rip)      # 0x10de8
movl %ebx, %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movl %ecx, 0x9e62(%rip)      # 0x10dec
movl %ebx, %ecx
shrl $0x12, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
orq %rax, %rcx
movq %rcx, 0x9e51(%rip)      # 0x10df0
movl 0x9e0b(%rip), %edi      # 0x10db0
callq 0x3fa3
leaq 0x3590(%rip), %rdi      # 0xa541
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movslq 0x9dee(%rip), %rax      # 0x10db0
movl %eax, %ecx
negl %ecx
shlq $0x2, %rcx
addq 0x9eff(%rip), %rcx      # 0x10ed0
leaq (,%rax,4), %rdx
addq 0x9df8(%rip), %rdx      # 0x10dd8
testq %rax, %rax
cmovsq %rcx, %rdx
movl (%rdx), %esi
leaq 0x2e0d(%rip), %rdi      # 0x9dfd
xorl %eax, %eax
callq 0x3120
movq %rbx, %rdi
callq 0x3f81
movl 0x9de3(%rip), %edi      # 0x10de8
movl 0x9de1(%rip), %esi      # 0x10dec
callq 0x6ef5
leaq 0x2ded(%rip), %rdi      # 0x9e04
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movq 0x9dc8(%rip), %rdi      # 0x10df0
callq 0x3f81
leaq 0x2dd7(%rip), %rdi      # 0x9e0b
xorl %eax, %eax
callq 0x3120
movq 0x9d1e(%rip), %rdi      # 0x10d60
callq 0x3f81
movl $0x20, %edi
callq 0x3050
movq 0x9d40(%rip), %rdi      # 0x10d98
callq 0x3f81
movl $0x1, %r14d
leaq 0x9cf6(%rip), %r15      # 0x10d60
leaq 0x34cf(%rip), %rbx      # 0xa540
movq (%r15,%r14,8), %rdi
callq 0x3fe9
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
incq %r14
cmpq $0x7, %r14
jne 0x7071
movq 0x9d09(%rip), %rdi      # 0x10da0
callq 0x3fe9
leaq 0x349d(%rip), %rdi      # 0xa540
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movl 0x9c91(%rip), %eax      # 0x10d44
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
incq %rcx
testl %eax, %eax
leaq 0x8a7a(%rip), %rax      # 0xfb40
movl $0x0, %edx
cmovnsq %rcx, %rdx
cmpl $0x1, (%rax)
leaq 0x2d3e(%rip), %rax      # 0x9e17
sbbq $-0x1, %rax
movsbl (%rax), %esi
leaq 0x2d33(%rip), %rax      # 0x9e1a
xorl %ecx, %ecx
cmpl $0x1, 0x9c58(%rip)      # 0x10d48
movsbl (%rdx,%rax), %edx
sete %cl
leaq 0x2d20(%rip), %rax      # 0x9e1e
movsbl (%rcx,%rax), %ecx
leaq 0x2d05(%rip), %rdi      # 0x9e0e
xorl %eax, %eax
callq 0x3120
movq 0x9c19(%rip), %rsi      # 0x10d30
leaq 0x2d03(%rip), %rdi      # 0x9e21
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x3120