// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_bbml_t_parse_body
er_t x_bbml_t_parse_body( x_bbml* o, tp_t t, x_source* source )
{
    // bcore_x_bbml.h:244:1
    
    x_stamp* stamp =((x_stamp*)( o));
    if( x_bbml_t_defines_bbml_body_from_source(t ) )
    {
        BLM_TRY(x_bbml_t_bbml_body_from_source(o,t, source ))
    }
    else if( t == ((tp_t)(TYPEOF_st_s)) )
    {
        st_s* st = ((st_s*)(o));
        st_s_clear(st);
        char c = 0;
        while( (c = x_source_get_char(source)) != 0 ) st_s_push_char(st,c );
    }
    else if( x_stamp_t_is_leaf(t ) )
    {
        BLM_TRY(x_bbml_t_parse_leaf_body( o,t, source ))
    }
    else if( x_stamp_t_is_pure_array(t ) )
    {
        x_array* arr =((x_array*)( stamp));
    
        if( x_array_t_is_mutable_mono_typed(t ) ) x_array_t_set_gtype(arr,t, x_bbml_parse_type(source ) );
    
        sz_t size = x_bbml_parse_size(source );
    
        if( x_array_t_is_fixed(t ) )
        {
            sz_t arr_size = x_array_t_size(arr,t );
    
            for(sz_t i = 0; i < size; i++ )
            {
                sr_s sr = sr_null();
                BLM_TRY(x_bbml_parse_create_object(source, (&(sr)) ))
                if( i < arr_size )
                {
                    x_array_t_set_sr(arr,t, i, sr );
                }
                else
                {
                    sr_down( sr );
                }
            }
        }
        else
        {
            x_array_t_set_size(arr,t, size );
            for(sz_t i = 0; i < size; i++ )
            {
                sr_s sr = sr_null();
                BLM_TRY(x_bbml_parse_create_object(source, (&(sr)) ))
                x_array_t_set_sr(arr,t, i, sr );
            }
        }
    }
    else
    {
        while( !x_source_eos(source) )
        {
            // non existing member variables are parsed but not assigned
            tp_t tp_name = x_bbml_parse_type(source );
            if( !tp_name ) break;
    
            sr_s sr = sr_null();
            BLM_TRY(x_bbml_parse_create_object(source, (&(sr)) ))
            if( x_stamp_t_exists(t, tp_name ) )
            {
                BLM_TRY(x_stamp_t_set_sr(stamp,t, tp_name, sr ))
            }
            else
            {
                sr_down( sr );
            }
        }
    }
    
    x_stamp_t_source(stamp,t, source );
    x_stamp_t_mutated(stamp,t );
    
    return  0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x586c1
cmpq $0x0, 0x10(%rax)
je 0x3797a
movq %rbx, %rdi
callq 0x586c1
movq %r14, %rdi
movq %r15, %rsi
callq *0x10(%rax)
testq %rax, %rax
je 0x379c4
movq %rax, %r13
leaq 0xe0460(%rip), %rax     # 0x117dd0
movq (%rax), %rdi
callq 0x71b64
jmp 0x379e0
movabsq $-0x503db0e6e1c2e704, %rax # imm = 0xAFC24F191E3D18FC
cmpq %rax, %rbx
jne 0x379aa
movq %r14, %rdi
callq 0x8f0c3
movq %r15, %rdi
callq 0x36ed6
testb %al, %al
je 0x379c4
movsbl %al, %esi
movq %r14, %rdi
callq 0x8f0ee
jmp 0x37991
movq %rbx, %rdi
callq 0x36f05
testb %al, %al
je 0x379f2
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x37be4
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x36dad
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3705d
xorl %r13d, %r13d
movq %r13, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x36f22
testb %al, %al
je 0x37ad3
movq %rbx, %rdi
callq 0x36f27
testb %al, %al
je 0x37a24
movq %r15, %rdi
callq 0x378e4
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x36f75
movq %r15, %rdi
callq 0x37f60
movq %rax, %r12
movq %rbx, %rdi
callq 0x36fb4
movq %r14, %rdi
movq %rbx, %rsi
testb %al, %al
je 0x37b80
callq 0x36fc4
movq %rax, 0x40(%rsp)
xorl %ebp, %ebp
testq %r12, %r12
cmovleq %rbp, %r12
cmpq %rbp, %r12
je 0x379c4
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3743e
testq %rax, %rax
jne 0x37966
cmpq 0x40(%rsp), %rbp
jge 0x37aaf
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x36fdc
jmp 0x37ace
testb $0x2, 0x30(%rsp)
je 0x37ace
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8cdc1
incq %rbp
jmp 0x37a58
leaq 0x20(%rsp), %r12
movq %r15, %rdi
callq 0x2ef3b
testb %al, %al
jne 0x379c4
movq %r15, %rdi
callq 0x378e4
testq %rax, %rax
je 0x379c4
movq %rax, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x3743e
testq %rax, %rax
jne 0x37966
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x37046
testb %al, %al
je 0x37b58
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x2f7d2
testq %rax, %rax
je 0x37ad8
jmp 0x37966
testb $0x2, 0x30(%rsp)
je 0x37ad8
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x8cdc1
jmp 0x37ad8
movq %r12, %rdx
callq 0x37003
xorl %ebp, %ebp
testq %r12, %r12
cmovleq %rbp, %r12
cmpq %rbp, %r12
je 0x379c4
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3743e
testq %rax, %rax
jne 0x37966
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x36fdc
incq %rbp
jmp 0x37b91