// File: /workspace/github_c_makefile_star2_O1/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 0xca6d
leaq 0xe109(%rip), %rbx      # 0x1cfc8
movq (%rbx), %rdi
movl $0x1, %esi
callq 0x127bd
cmpq (%rbx), %rax
je 0xf036
movq %rax, %rcx
leaq 0x4e81(%rip), %rsi      # 0x13d60
leaq 0x10(%rsp), %r15
leaq 0x5221(%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 0x5091(%rip), %rsi      # 0x13fa8
movq %rbp, %rdx
movq %rbp, %rcx
callq 0xcad8
incq %r12
xorl %ebp, %ebp
movzbl -0x1(%r12), %eax
cmpl $0x28, %eax
jle 0xef4f
cmpl $0x29, %eax
je 0xef5e
cmpl $0x2c, %eax
jne 0xefcf
movq %r12, %rdi
callq 0x9190
movl %eax, %ebx
jmp 0xefcf
jne 0xefa6
movq %r12, %rdi
callq 0x9170
movq %rax, %r14
jmp 0xefcf
movq %r15, %rdi
leaq 0x54a4(%rip), %rsi      # 0x1440c
movl %r13d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
callq 0xc982
movl %ebx, %edi
callq 0xf62a
movl %eax, %edi
leaq 0xc(%rsp), %rsi
callq 0xf662
movq %rax, %rdi
callq 0xca9b
cmpq $0x1, %r14
jne 0xefac
movw $0x3f, 0x10(%rsp)
jmp 0xefc0
testl %eax, %eax
jne 0xefcf
jmp 0xefd7
movq %r15, %rdi
leaq 0x4ff8(%rip), %rsi      # 0x13fae
movq %r14, %rdx
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
callq 0xc9d9
callq 0xca3f
incl %ebp
incq %r12
jmp 0xef27
movq %r15, %rdi
leaq 0x4d7f(%rip), %rbp      # 0x13d60
movq %rbp, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x91b0
movq %r15, %rdi
leaq 0x4fc2(%rip), %rsi      # 0x13fba
leaq 0x510d(%rip), %r12      # 0x1410c
movq %r12, %rdx
movq %r12, %rcx
callq 0xcad8
callq 0xca6d
incl %r13d
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x127da
movq %rbp, %rsi
movq %rax, %rcx
leaq 0xdf9b(%rip), %rax      # 0x1cfc8
cmpq (%rax), %rcx
jne 0xeeee
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq