// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x80, %rsp
movl $0x0, -0x54(%rbp)
callq 0xe280
leaq 0xedca(%rip), %rax      # 0x20198
movq (%rax), %rdi
movl $0x1, %esi
callq 0x16d10
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
leaq 0xedae(%rip), %rcx      # 0x20198
cmpq (%rcx), %rax
je 0x11598
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x54(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x50(%rbp), %rdi
movl -0x54(%rbp), %edx
leaq 0x69e0(%rip), %rsi      # 0x17e02
movb $0x0, %al
callq 0x9190
leaq -0x50(%rbp), %rdi
leaq 0x6c16(%rip), %rsi      # 0x1804a
leaq 0x6d85(%rip), %rcx      # 0x181c0
movq %rcx, %rdx
callq 0xe2d0
movl $0x0, -0x78(%rbp)
movq -0x60(%rbp), %rax
movb (%rax), %al
movb %al, -0x61(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x11544
movsbl -0x61(%rbp), %eax
movl %eax, -0x80(%rbp)
subl $0x28, %eax
je 0x11484
jmp 0x1146d
movl -0x80(%rbp), %eax
subl $0x29, %eax
je 0x114af
jmp 0x11477
movl -0x80(%rbp), %eax
subl $0x2c, %eax
je 0x1149a
jmp 0x11531
movq -0x60(%rbp), %rdi
addq $0x1, %rdi
callq 0x9150
movq %rax, -0x70(%rbp)
jmp 0x11533
movq -0x60(%rbp), %rdi
addq $0x1, %rdi
callq 0x9170
movl %eax, -0x74(%rbp)
jmp 0x11533
leaq -0x50(%rbp), %rdi
movl -0x54(%rbp), %edx
movl -0x78(%rbp), %ecx
leaq 0x701c(%rip), %rsi      # 0x184dc
movb $0x0, %al
callq 0x9190
leaq -0x50(%rbp), %rdi
callq 0xe110
movl -0x74(%rbp), %edi
callq 0x11eb0
movl %eax, %edi
leaq -0x7c(%rbp), %rsi
callq 0x11fb0
movq %rax, %rdi
callq 0xe290
cmpq $0x1, -0x70(%rbp)
jne 0x11504
leaq -0x50(%rbp), %rdi
leaq 0x5c2f(%rip), %rsi      # 0x1712c
callq 0x9060
jmp 0x1151a
leaq -0x50(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq 0x6b3d(%rip), %rsi      # 0x18050
movb $0x0, %al
callq 0x9190
leaq -0x50(%rbp), %rdi
callq 0xe190
callq 0xe240
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x11533
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x1144a
leaq -0x50(%rbp), %rdi
movl -0x54(%rbp), %edx
leaq 0x68b0(%rip), %rsi      # 0x17e02
movb $0x0, %al
callq 0x9190
leaq -0x50(%rbp), %rdi
leaq 0x6af8(%rip), %rsi      # 0x1805c
leaq 0x6c55(%rip), %rcx      # 0x181c0
movq %rcx, %rdx
callq 0xe2d0
callq 0xe280
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x16d70
movq %rax, -0x8(%rbp)
jmp 0x113df
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)