// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_bcml_t_translate_recursive
void x_bcml_t_translate_recursive( const x_bcml* o, tp_t t, bl_t push_existence, bl_t push_type, bl_t shelve, x_sink* sink )
{
    // bcore_x_bcml.h:391:1
    
    // shelving obj_l
    if( o && shelve && bcore_via_call_t_defines_shelve(t ) )
    {
        x_bcml* o_clone =((x_bcml*)( x_inst_t_clone(((const x_inst*)(o)),t ))); // no scoping (o_clone is obliv)
        x_stamp_t_shelve(((x_stamp*)(o_clone)),t );
        x_bcml_t_translate_recursive(o_clone,t, push_existence, push_type, false, sink );
        x_inst_discard(((x_inst*)(o_clone)));
        return ;
    }
    
    if( push_type )      x_bcml_push_type(sink, t );
    if( push_existence ) x_bcml_push_flag(sink, o != NULL );
    
    if( o )
    {
        if( x_bcml_t_defines_bcml_body_to_sink(t ) )
        {
            x_bcml_t_bcml_body_to_sink(o,t, sink );
        }
        else if( t == TYPEOF_st_s ) // strings
        {
            const st_s* string = ((const st_s*)(o));
            x_sink_push_data(sink,( vc_t )string->data, string->size + 1 ); // push string including terminating 0
        }
        else if( x_stamp_t_is_leaf(t ) )
        {
            x_bcml_push_leaf(sink, t,((const x_inst*)( o )));
        }
        else
        {
            if( x_stamp_t_is_pure_array(t ) )
            {
                const x_array* arr =((const x_array*)( o));
                if( x_array_t_is_mutable_mono_typed(t ) ) x_bcml_push_type(sink, x_array_t_get_mono_type(arr,t ) );
                sz_t size = x_array_t_size(arr,t );
                x_bcml_push_size(sink, size );
                bl_t is_of_links = x_array_t_is_of_links(t );
                tp_t static_type = x_array_t_get_static_type(t );
    
                if( ( !is_of_links ) && ( static_type != 0 ) && x_stamp_t_is_leaf(static_type ) )
                {
                    x_bcml_push_leaf_arr(sink, static_type, x_array_t_get_data_c(arr,t ), size );
                }
                else
                {
                    for(sz_t i = 0; i < size; i++ )
                    {
                        sr_s sr = x_array_t_c_get_sr(arr,t, i );
                        x_bcml_t_translate_recursive(((const x_bcml*)( sr.o)),sr_s_o_type(&(sr)), is_of_links, static_type == 0, true, sink );
                        sr_down( sr );
                    }
                }
            }
            else
            {
                const x_stamp* stamp =((const x_stamp*)( o));
                sz_t size = x_stamp_t_size(t );
                for(sz_t i = 0; i < size; i++ )
                {
                    sr_s sr = x_stamp_t_c_get_sr_i(stamp,t, i );
                    x_bcml_t_translate_recursive(((const x_bcml*)( sr.o)),sr_s_o_type(&(sr)), x_stamp_t_is_link_i(t, i ), !x_stamp_t_is_static_i(t, i ), true, sink );
                    sr_down( sr );
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %dl
movb %dl, -0x11(%rbp)
andb $0x1, %cl
movb %cl, -0x12(%rbp)
andb $0x1, %al
movb %al, -0x13(%rbp)
movq %r9, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x572b8
testb $0x1, -0x13(%rbp)
je 0x572b8
movq -0x10(%rbp), %rdi
callq 0x54b20
testb $0x1, %al
jne 0x57267
jmp 0x572b8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54b50
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54b80
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movb -0x11(%rbp), %cl
movb -0x12(%rbp), %al
movq -0x20(%rbp), %r9
xorl %r8d, %r8d
andb $0x1, %cl
andb $0x1, %al
movzbl %cl, %edx
movzbl %al, %ecx
callq 0x57220
movq -0x28(%rbp), %rdi
callq 0x56920
jmp 0x57611
testb $0x1, -0x12(%rbp)
je 0x572cb
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x58ba0
testb $0x1, -0x11(%rbp)
je 0x572e8
movq -0x20(%rbp), %rdi
cmpq $0x0, -0x8(%rbp)
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x58bd0
cmpq $0x0, -0x8(%rbp)
je 0x57611
movq -0x10(%rbp), %rdi
callq 0x58c10
testb $0x1, %al
jne 0x57302
jmp 0x57318
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x58c40
jmp 0x5760f
movabsq $-0x503db0e6e1c2e704, %rax # imm = 0xAFC24F191E3D18FC
cmpq %rax, -0x10(%rbp)
jne 0x57352
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdx
addq $0x1, %rdx
callq 0x4fbe0
jmp 0x5760d
movq -0x10(%rbp), %rdi
callq 0x54810
testb $0x1, %al
jne 0x57361
jmp 0x57377
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x584b0
jmp 0x5760b
movq -0x10(%rbp), %rdi
callq 0x54870
testb $0x1, %al
jne 0x57389
jmp 0x57507
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x548a0
testb $0x1, %al
jne 0x573a0
jmp 0x573c7
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54960
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0x58ba0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x549c0
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x58c80
movq -0x10(%rbp), %rdi
callq 0x58370
andb $0x1, %al
movb %al, -0x41(%rbp)
movq -0x10(%rbp), %rdi
callq 0x58390
movq %rax, -0x50(%rbp)
testb $0x1, -0x41(%rbp)
jne 0x5745e
cmpq $0x0, -0x50(%rbp)
je 0x5745e
movq -0x50(%rbp), %rdi
callq 0x54810
testb $0x1, %al
jne 0x5741c
jmp 0x5745e
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x58cb0
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movq %rax, %rdx
movq -0x40(%rbp), %rcx
callq 0x587d0
jmp 0x57502
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x57500
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x58(%rbp), %rcx
leaq -0x70(%rbp), %rdi
callq 0x44940
movq -0x70(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x52c00
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
movb -0x41(%rbp), %cl
cmpq $0x0, -0x50(%rbp)
sete %al
movq -0x20(%rbp), %r9
movzbl %cl, %edx
andl $0x1, %edx
movzbl %al, %ecx
andl $0x1, %ecx
movl $0x1, %r8d
callq 0x57220
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x45510
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x57466
jmp 0x57502
jmp 0x57609
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ce70
movq %rax, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x88(%rbp), %rax
cmpq -0x80(%rbp), %rax
jge 0x57607
movq -0x78(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x88(%rbp), %rcx
leaq -0xa0(%rbp), %rdi
callq 0x46220
movq -0xa0(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x52c00
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x58480
movb %al, -0xd1(%rbp)
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x58420
movb -0xd1(%rbp), %cl
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
xorb $-0x1, %al
movq -0x20(%rbp), %r9
movzbl %cl, %edx
andl $0x1, %edx
movzbl %al, %ecx
andl $0x1, %ecx
movl $0x1, %r8d
callq 0x57220
leaq -0xa0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x45510
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x57527
jmp 0x57609
jmp 0x5760b
jmp 0x5760d
jmp 0x5760f
jmp 0x57611
addq $0xf0, %rsp
popq %rbp
retq
nopw (%rax,%rax)