// File: /workspace/github_c_makefile_star2_O3/Nico01[P]obj2asm/oreport.c
// Function: list_struc
void list_struc()
{
    NODE_T          *struc_node;
    STRUC_T         *struc_rec;
    char            temp[50];
    int             index;
    char            *cp;
    char            ch;
    dword   dup_cnt;
    int             type;
    int             mem_cnt;
    int             times;

    index = 0;
    out_newline();
    struc_node = start( struc_tree, RIGHT );
    while ( struc_node != struc_tree ) {
        struc_rec = (STRUC_T *)struc_node->data;

        struc_rec->index = index;
        cp = struc_rec->form;

        sprintf( temp, "struct_%d", index );
        out_line( temp, "struc", "", "" );

        mem_cnt = 0;
        while ( (ch=*cp) != '\0' ) {
            switch( ch ) {
                case '(':
                    dup_cnt = atol( cp+1 );
                    break;
                case ',':
                    type = atoi( cp+1 );
                    break;
                case ')':
                    sprintf( temp, "s%dm_%d", index, mem_cnt );
                    out_label( temp );
                    out_directive( size_to_opcode(type_to_size(type), &times) );
                    if ( dup_cnt == 1L ) {
                        strcpy( temp, "?" );
                    } else {
                        sprintf( temp, "%ld dup (?)", dup_cnt );
                    }
                    out_operand( temp );
                    out_endline();
                    mem_cnt++;
                default:
                    break;
            }
            cp++;
        }

        sprintf( temp, "struct_%d", index );
        out_line( temp, "ends", "", "" );

        out_newline();

        index++;
        struc_node = traverse( struc_node, RIGHT );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
callq 0xcad9
leaq 0xe0cf(%rip), %rbx      # 0x1cfc8
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x1286f
cmpq (%rbx), %rax
je 0xf070
movq %rax, %rcx
leaq 0x4e47(%rip), %rsi      # 0x13d60
leaq 0x10(%rsp), %r15
leaq 0x51e7(%rip), %r12      # 0x1410c
xorl %r13d, %r13d
movq %rcx, (%rsp)
movq 0x20(%rcx), %rax
movl %r13d, 0x8(%rax)
movq %r12, %rbp
movq (%rax), %r12
movq %r15, %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
leaq 0x5057(%rip), %rsi      # 0x13fa8
movq %rbp, %rdx
movq %rbp, %rcx
callq 0xcb44
incq %r12
xorl %ebp, %ebp
movzbl -0x1(%r12), %eax
cmpl $0x28, %eax
jle 0xef89
cmpl $0x29, %eax
je 0xef98
cmpl $0x2c, %eax
jne 0xf009
movq %r12, %rdi
callq 0x9190
movl %eax, %ebx
jmp 0xf009
jne 0xefe0
movq %r12, %rdi
callq 0x9170
movq %rax, %r14
jmp 0xf009
movq %r15, %rdi
leaq 0x546a(%rip), %rsi      # 0x1440c
movl %r13d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
callq 0xc9ee
movl %ebx, %edi
callq 0xf666
movl %eax, %edi
leaq 0xc(%rsp), %rsi
callq 0xf69e
movq %rax, %rdi
callq 0xcb07
cmpq $0x1, %r14
jne 0xefe6
movw $0x3f, 0x10(%rsp)
jmp 0xeffa
testl %eax, %eax
jne 0xf009
jmp 0xf011
movq %r15, %rdi
leaq 0x4fbe(%rip), %rsi      # 0x13fae
movq %r14, %rdx
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
callq 0xca45
callq 0xcaab
incl %ebp
incq %r12
jmp 0xef61
movq %r15, %rdi
leaq 0x4d45(%rip), %rbp      # 0x13d60
movq %rbp, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
leaq 0x4f88(%rip), %rsi      # 0x13fba
leaq 0x50d3(%rip), %r12      # 0x1410c
movq %r12, %rdx
movq %r12, %rcx
callq 0xcb44
callq 0xcad9
incl %r13d
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x1288c
movq %rbp, %rsi
movq %rax, %rcx
leaq 0xdf61(%rip), %rax      # 0x1cfc8
cmpq (%rax), %rcx
jne 0xef28
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq