// File: /workspace/github_c_makefile_star2_O0/Nico01[P]obj2asm/oprocess.c
// Function: iterated
void iterated(DAT_T *data_rec, DAT_T *next_rec)
{
    char            temp[20];
    word    length;
    word    length_used;
    PUB_T           *save_pub_rec;
    int             dup_only;
    int             dummy;
    dword   repeat;
    STRUC_T         *this_struc;

    length = data_rec->length;
    fseek( o_file, data_rec->file_pos, L_SET );
    length = buff_init( length );

    if ( data_check( 0 ) == LABEL ) {
        proc_label();
    }

    save_pub_rec = last_pub_rec;
    if ( last_pub_rec ) {
        if ( pass == 3 ) {
            if ( last_pub_rec->type == FAR ) {
                out_directive("=");
                out_operand("$");
            }
            if ( last_pub_rec->type == NEAR ) {
                out_endline();
            }
        }
    }

    /*
    ** Process iterated data with this record
    */
    strcpy( structure_form, "" );
    if ( data_rec->structure ) {
        /* Processing for structures */
        dup_only = FALSE;
    } else {
        if ( pass == 1 ) {
            dup_only = FALSE;       /* Give 1 chance (pass 1) at structuring */
        } else {
            dup_only = TRUE;
        }
    }

    dup_buff[0]   = '\0';
    strcpy( struc_buff, "<" );

    while ( length > 0 ) {
        length_used = 0;
        data_rec->size = proc_idb( 1, 1L, &dup_only, data_rec->extended,
                                           &length_used, &repeat );
        sprintf( temp, "(%ld,%1d)", repeat, size_to_type(data_rec->size) );
        strcat( structure_form, temp );
        length -= length_used;
        if ( length ) {
            strcat( dup_buff, "," );
            strcat( struc_buff, "," );
        }
    }

    if ( dup_only ) {
        if ( save_pub_rec ) {
            save_pub_rec->type = size_to_type( data_rec->size );
        }
        if ( pass == 3 ) {
            out_directive( size_to_opcode(data_rec->size, &dummy) );
            out_operand( dup_buff );
            out_endline();
        }
    } else {
        /*
        ** Its a structure!
        */
        strcat( struc_buff, ">" );

        if ( pass == 1 ) {
            data_rec->structure = struc_insert( structure_form );
        }

        this_struc = data_rec->structure;

        if ( save_pub_rec ) {
            save_pub_rec->structure = this_struc;
        }

        if ( pass == 3 ) {
            sprintf( temp, "struct_%d", this_struc->index );
            out_directive( temp );
            out_operand( struc_buff );
            out_endline();
        }
    }

    next_rec = next_rec;       /* Prevent unused variable warnings */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x34(%rbp)
leaq 0x10207(%rip), %rax     # 0x20128
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
xorl %edx, %edx
callq 0x9140
movl -0x34(%rbp), %edi
callq 0x11960
movl %eax, -0x34(%rbp)
xorl %edi, %edi
callq 0xe580
cmpl $0x1, %eax
jne 0xff4f
callq 0xf180
leaq 0x1030a(%rip), %rax     # 0x20260
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq 0x102fc(%rip), %rax     # 0x20260
cmpq $0x0, (%rax)
je 0xffb7
leaq 0x101c7(%rip), %rax     # 0x20138
cmpl $0x3, (%rax)
jne 0xffb5
leaq 0x102e3(%rip), %rax     # 0x20260
movq (%rax), %rax
cmpl $0x2, 0x38(%rax)
jne 0xff9e
leaq 0x7614(%rip), %rdi      # 0x175a1
callq 0xe290
leaq 0x7d7f(%rip), %rdi      # 0x17d18
callq 0xe190
leaq 0x102bb(%rip), %rax     # 0x20260
movq (%rax), %rax
cmpl $0x1, 0x38(%rax)
jne 0xffb3
callq 0xe240
jmp 0xffb5
jmp 0xffb7
leaq 0x10732(%rip), %rdi     # 0x206f0
leaq 0x81fb(%rip), %rsi      # 0x181c0
callq 0x9060
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xffde
movl $0x0, -0x44(%rbp)
jmp 0xfffc
leaq 0x10153(%rip), %rax     # 0x20138
cmpl $0x1, (%rax)
jne 0xfff3
movl $0x0, -0x44(%rbp)
jmp 0xfffa
movl $0x1, -0x44(%rbp)
jmp 0xfffc
movb $0x0, 0x1048d(%rip)     # 0x20490
leaq 0x10586(%rip), %rdi     # 0x20590
leaq 0x7de3(%rip), %rsi      # 0x17df4
callq 0x9060
cmpl $0x0, -0x34(%rbp)
jbe 0x100d2
movl $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
movl $0x1, %edi
movl $0x1, %esi
leaq -0x44(%rbp), %rdx
leaq -0x38(%rbp), %r8
leaq -0x50(%rbp), %r9
callq 0xeb30
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
leaq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edi
callq 0x11de0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
movl %eax, %ecx
leaq 0x7d77(%rip), %rsi      # 0x17df6
movb $0x0, %al
callq 0x9190
leaq -0x30(%rbp), %rsi
leaq 0x1065f(%rip), %rdi     # 0x206f0
callq 0x9180
movl -0x38(%rbp), %ecx
movl -0x34(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x100cd
leaq 0x103e2(%rip), %rdi     # 0x20490
leaq 0x7fd8(%rip), %rsi      # 0x1808d
callq 0x9180
leaq 0x104cf(%rip), %rdi     # 0x20590
leaq 0x7fc5(%rip), %rsi      # 0x1808d
callq 0x9180
jmp 0x10016
cmpl $0x0, -0x44(%rbp)
je 0x1012e
cmpq $0x0, -0x40(%rbp)
je 0x100f4
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edi
callq 0x11de0
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x38(%rax)
leaq 0x1003d(%rip), %rax     # 0x20138
cmpl $0x3, (%rax)
jne 0x10129
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edi
leaq -0x48(%rbp), %rsi
callq 0x11fb0
movq %rax, %rdi
callq 0xe290
leaq 0x10371(%rip), %rdi     # 0x20490
callq 0xe190
callq 0xe240
jmp 0x101c4
leaq 0x1045b(%rip), %rdi     # 0x20590
leaq 0x7cc4(%rip), %rsi      # 0x17e00
callq 0x9180
leaq 0xfff0(%rip), %rax      # 0x20138
cmpl $0x1, (%rax)
jne 0x10164
leaq 0x1059c(%rip), %rdi     # 0x206f0
callq 0x120d0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x10183
movq -0x58(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x48(%rax)
leaq 0xffae(%rip), %rax      # 0x20138
cmpl $0x3, (%rax)
jne 0x101c2
leaq -0x30(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x7c61(%rip), %rsi      # 0x17e02
movb $0x0, %al
callq 0x9190
leaq -0x30(%rbp), %rdi
callq 0xe290
leaq 0x103d8(%rip), %rdi     # 0x20590
callq 0xe190
callq 0xe240
jmp 0x101c4
movq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)