// File: /workspace/github_c_makefile_star2_O1/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 0x6f38
leaq 0x34b7(%rip), %rdi      # 0xa3ea
jmp 0x30b0
pushq %r15
pushq %r14
pushq %rbx
movl 0x9e6d(%rip), %edi      # 0x10db0
callq 0x7109
movq %rax, %rbx
andl $0x40000000, %eax       # imm = 0x40000000
movl %ebx, %ecx
andl $0x3f, %ecx
movl %ecx, 0x9e8d(%rip)      # 0x10de8
movl %ebx, %ecx
shrl $0x6, %ecx
andl $0x3f, %ecx
movl %ecx, 0x9e83(%rip)      # 0x10dec
movl %ebx, %ecx
shrl $0x12, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
orq %rax, %rcx
movq %rcx, 0x9e72(%rip)      # 0x10df0
movl 0x9e2c(%rip), %edi      # 0x10db0
callq 0x3fca
leaq 0x35b1(%rip), %rdi      # 0xa541
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movslq 0x9e0f(%rip), %rax      # 0x10db0
movl %eax, %ecx
negl %ecx
shlq $0x2, %rcx
addq 0x9f20(%rip), %rcx      # 0x10ed0
leaq (,%rax,4), %rdx
addq 0x9e19(%rip), %rdx      # 0x10dd8
testq %rax, %rax
cmovsq %rcx, %rdx
movl (%rdx), %esi
leaq 0x2e2e(%rip), %rdi      # 0x9dfd
xorl %eax, %eax
callq 0x3120
movq %rbx, %rdi
callq 0x3fa8
movl 0x9e04(%rip), %edi      # 0x10de8
movl 0x9e02(%rip), %esi      # 0x10dec
callq 0x6ed4
leaq 0x2e0e(%rip), %rdi      # 0x9e04
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movq 0x9de9(%rip), %rdi      # 0x10df0
callq 0x3fa8
leaq 0x2df8(%rip), %rdi      # 0x9e0b
xorl %eax, %eax
callq 0x3120
movq 0x9d3f(%rip), %rdi      # 0x10d60
callq 0x3fa8
movl $0x20, %edi
callq 0x3050
movq 0x9d61(%rip), %rdi      # 0x10d98
callq 0x3fa8
movl $0x1, %r14d
leaq 0x9d17(%rip), %r15      # 0x10d60
leaq 0x34f0(%rip), %rbx      # 0xa540
movq (%r15,%r14,8), %rdi
callq 0x4010
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
incq %r14
cmpq $0x7, %r14
jne 0x7050
movq 0x9d2a(%rip), %rdi      # 0x10da0
callq 0x4010
leaq 0x34be(%rip), %rdi      # 0xa540
movq %rax, %rsi
xorl %eax, %eax
callq 0x3120
movl 0x9cb2(%rip), %eax      # 0x10d44
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
incq %rcx
testl %eax, %eax
leaq 0x8a9b(%rip), %rax      # 0xfb40
movl $0x0, %edx
cmovnsq %rcx, %rdx
cmpl $0x1, (%rax)
leaq 0x2d5f(%rip), %rax      # 0x9e17
sbbq $-0x1, %rax
movsbl (%rax), %esi
leaq 0x2d54(%rip), %rax      # 0x9e1a
xorl %ecx, %ecx
cmpl $0x1, 0x9c79(%rip)      # 0x10d48
movsbl (%rdx,%rax), %edx
sete %cl
leaq 0x2d41(%rip), %rax      # 0x9e1e
movsbl (%rcx,%rax), %ecx
leaq 0x2d26(%rip), %rdi      # 0x9e0e
xorl %eax, %eax
callq 0x3120
movq 0x9c3a(%rip), %rsi      # 0x10d30
leaq 0x2d24(%rip), %rdi      # 0x9e21
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x3120