// File: /workspace/github_c_makefile_star2_O0/mikebdp2[P]AtomDis/main.c
// Function: do_list
void do_list (bios_tables_t *tabs)
{
    int i, len;
    const char *ind;

    fputs ("Command Tables:\n", stdout);
    for (i = 0; i < sizeof (ATOM_MASTER_LIST_OF_COMMAND_TABLES) / sizeof (uint16_t); i++) {
	int off = get_table_offset(tabs->MasterCommandTables, i);
	if (off)
	    fprintf (stdout, "  %04x:   %04x  Len %04x",
		     i, off, * (uint16_t *) (tabs->base+off));
	else
	    fprintf (stdout, "  %04x:   -             ", i);
	if ( (ind = get_index (INDEX_COMMAND_TABLE, i)) )
	    fprintf (stdout, "  (%s)", ind);
	putc ('\n', stdout);
    }
    fprintf (stdout, "\nData Tables:\n");
    for (i = 0; i < sizeof (ATOM_MASTER_LIST_OF_DATA_TABLES) / sizeof (uint16_t); i++) {
	data_dumper_t *dt   = NULL;
	const char *comment = NULL;
	int off = get_table_offset(tabs->MasterDataTables, i);
	if (off) {
	    uint8_t *data= tabs->base + off;
	    int     frev = data[2];
	    int     crev = data[3];
	    fprintf (stdout, "  %04x:   %04x  Len %04x  Rev %02x:%02x",
		     i, off, * (uint16_t *) data, frev, crev);
	    dt = get_data_dumper (i, &frev, &crev, &comment);
	} else
	    fprintf (stdout, "  %04x:   -                        ", i);
	if ( (ind = get_index (INDEX_DATA_TABLE, i)) )
	    fprintf (stdout, "  (%s)", ind);
	if (dt && (len = (*dt) (NULL, NULL, 0)) )
	    fprintf (stdout, "    (struct size %04x)", len);
	putc ('\n', stdout);
    }
    putc ('\n', stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq 0x5e7dd(%rip), %rax     # 0x63fc0
movq (%rax), %rsi
leaq 0x46d37(%rip), %rdi     # 0x4c524
callq 0x40a0
movl $0x0, -0xc(%rbp)
movslq -0xc(%rbp), %rax
cmpq $0x50, %rax
jae 0x58c0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x5190
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x5850
movq 0x5e799(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rsi
movzwl (%rax,%rsi), %r8d
leaq 0x46cee(%rip), %rsi     # 0x4c535
movb $0x0, %al
callq 0x4130
jmp 0x586b
movq 0x5e769(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x46cea(%rip), %rsi     # 0x4c54e
movb $0x0, %al
callq 0x4130
movl -0xc(%rbp), %esi
movl $0x1, %edi
callq 0x4b6b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x589e
movq 0x5e737(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x46d52(%rip), %rsi     # 0x4c5e9
movb $0x0, %al
callq 0x4130
movq 0x5e71b(%rip), %rax     # 0x63fc0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x4120
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x57f9
movq 0x5e6f9(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
leaq 0x46c96(%rip), %rsi     # 0x4c567
movb $0x0, %al
callq 0x4130
movl $0x0, -0xc(%rbp)
movslq -0xc(%rbp), %rax
cmpq $0x22, %rax
jae 0x5a2e
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x5190
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x5988
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x34(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, -0x48(%rbp)
movq 0x5e67b(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
movl -0x34(%rbp), %ecx
movq -0x40(%rbp), %rax
movzwl (%rax), %r8d
movl -0x44(%rbp), %r9d
movl -0x48(%rbp), %eax
leaq 0x46c12(%rip), %rsi     # 0x4c576
movl %eax, (%rsp)
movb $0x0, %al
callq 0x4130
movl -0xc(%rbp), %edi
leaq -0x44(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x4b5c0
movq %rax, -0x28(%rbp)
jmp 0x59a3
movq 0x5e631(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
movl -0xc(%rbp), %edx
leaq 0x46c02(%rip), %rsi     # 0x4c59e
movb $0x0, %al
callq 0x4130
movl -0xc(%rbp), %esi
movl $0x2, %edi
callq 0x4b6b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x59d6
movq 0x5e5ff(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x46c1a(%rip), %rsi     # 0x4c5e9
movb $0x0, %al
callq 0x4130
cmpq $0x0, -0x28(%rbp)
je 0x5a0c
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movq %rsi, %rdi
callq *-0x28(%rbp)
movl %eax, -0x10(%rbp)
cmpl $0x0, %eax
je 0x5a0c
movq 0x5e5c8(%rip), %rax     # 0x63fc0
movq (%rax), %rdi
movl -0x10(%rbp), %edx
leaq 0x46bbd(%rip), %rsi     # 0x4c5c2
movb $0x0, %al
callq 0x4130
movq 0x5e5ad(%rip), %rax     # 0x63fc0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x4120
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x58df
movq 0x5e58b(%rip), %rax     # 0x63fc0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x4120
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)