// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_btml_t_translate_recursive
void x_btml_t_translate_recursive( const x_btml* o, tp_t t, tp_t name, bl_t shelve, x_sink* sink, sz_t depth )
{
    // bcore_x_btml.h:570:1
    BLM_INIT_LEVEL(0);
    sz_t indent = 4 * depth;
    st_s* buf = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create()));
    
    // shelving obj_l
    if( o && shelve && bcore_via_call_t_defines_shelve(t ) )
    {
        x_btml* o_clone =((x_btml*)( x_inst_t_clone(((const x_inst*)(o)),t ))); // o_clone is obliv
        x_stamp_t_shelve(((x_stamp*)(o_clone)),t );
        x_btml_t_translate_recursive(o_clone,t, name, false, sink, depth );
        x_inst_t_discard(((x_inst*)(o_clone)),t );
        BLM_RETURN();
    }
    
    x_sink_push_fa(sink,"#rn{ }", indent );
    if( name ) x_sink_push_fa(sink,"#<sc_t>:", x_btml_name_of(name, buf ) );
    
    if( !o ) // o == NULL ...
    {
        if( t )
        {
            // Explicit NULL specifies that the object is not instantiated.
            // This is to differentiate from the case where the object was instantiated
            // without additional parameters.
            x_sink_push_fa(sink,"<#<sc_t>>NULL</>\n", x_btml_name_of(t, buf ) );
        }
        else
        {
            x_sink_push_fa(sink,"<></>\n" );
        }
    }
    else // o != NULL ...
    {
        x_sink_push_fa(sink,"<#<sc_t>>", x_btml_name_of(t, buf ) );
    
        if( x_btml_t_defines_btml_body_to_sink(t ) )
        {
            x_btml_t_btml_body_to_sink(o,t, sink );
        }
        else if( t == TYPEOF_st_s ) // strings
        {BLM_INIT_LEVEL(3);
            st_s* string = ((st_s*)BLM_LEVEL_T_PUSH(3,st_s,st_s_clone(((const st_s*)(o)))));
            st_s_replace_char_sc(string,'\"', "\\\"" );
            x_sink_push_fa(sink,"\"#<sc_t>\"", string->sc );
        BLM_DOWN();}
        else if( x_stamp_t_is_leaf(t ) )
        {
            switch( t )
            {
                case ((tp_t)(TYPEOF_tp_t)):
                case ((tp_t)(TYPEOF_er_t)):
                case ((tp_t)(TYPEOF_aware_t)):
                {
                    sc_t sc_name = bnameof( *( tp_t* )o );
                    if( sc_name )
                    {
                        x_sink_push_fa(sink,"#<sc_t>", sc_name );
                    }
                    else
                    {
                        x_sink_push_st_d(sink,st_s_create_typed(t, o ) );
                    }
                }
                break;
    
                default:
                {
                    x_sink_push_st_d(sink,st_s_create_typed(t, o ) );
                }
                break;
            }
        }
        else
        {
            x_sink_push_char(sink,'\n' );
            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 ) )
                {
                    tp_t mono_type = x_array_t_get_mono_type(arr,t );
                    x_btml_t_translate_recursive( ((const x_btml*)(&(mono_type))),((tp_t)(TYPEOF_tp_t)), TYPEOF_type, false, sink, depth + 1 );
                }
                sz_t size = x_array_t_size(arr,t );
                for(sz_t i = 0; i < size; i++ )
                {
                    sr_s sr = x_array_t_c_get_sr(arr,t, i );
                    x_btml_t_translate_recursive(((const x_btml*)( sr.o)),sr_s_o_type(&(sr)), 0, true, sink, depth + 1 );
                    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 );
                    tp_t name = x_stamp_t_name(t, i );
                    x_btml_t_translate_recursive(((const x_btml*)( sr.o)),sr_s_o_type(&(sr)), name, true, sink, depth + 1 );
                    sr_down( sr );
                }
            }
            x_sink_push_fa(sink,"#rn{ }", indent );
        }
        x_sink_push_sc(sink,"</>\n" );
    }
    BLM_DOWN();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x15f5b3(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xbfe80
movq -0x70(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x30(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x150(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x150(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x52e68
testb $0x1, -0x19(%rbp)
je 0x52e68
movq -0x10(%rbp), %rdi
callq 0x54b20
testb $0x1, %al
jne 0x52e08
jmp 0x52e68
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54b50
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54b80
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
xorl %ecx, %ecx
callq 0x52d50
movq -0x88(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54bc0
movq -0x70(%rbp), %rdi
callq 0xc0720
jmp 0x5339e
movq -0x28(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0xe0c58(%rip), %rsi     # 0x133acf
movb $0x0, %al
callq 0x43590
cmpq $0x0, -0x18(%rbp)
je 0x52eb5
movq -0x28(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x18(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x53480
movq -0x158(%rbp), %rdi
movq %rax, %rdx
leaq 0xecc07(%rip), %rsi     # 0x13fab5
movb $0x0, %al
callq 0x43590
cmpq $0x0, -0x8(%rbp)
jne 0x52f0c
cmpq $0x0, -0x10(%rbp)
je 0x52ef5
movq -0x28(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x10(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x53480
movq -0x160(%rbp), %rdi
movq %rax, %rdx
leaq 0xecbd2(%rip), %rsi     # 0x13fabe
movb $0x0, %al
callq 0x43590
jmp 0x52f07
movq -0x28(%rbp), %rdi
leaq 0xecbd0(%rip), %rsi     # 0x13fad0
movb $0x0, %al
callq 0x43590
jmp 0x53395
movq -0x28(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x10(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x53480
movq -0x168(%rbp), %rdi
movq %rax, %rdx
leaq 0xecba2(%rip), %rsi     # 0x13fad7
movb $0x0, %al
callq 0x43590
movq -0x10(%rbp), %rdi
callq 0x54bf0
testb $0x1, %al
jne 0x52f4b
jmp 0x52f61
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x54c20
jmp 0x53385
movabsq $-0x503db0e6e1c2e704, %rax # imm = 0xAFC24F191E3D18FC
cmpq %rax, -0x10(%rbp)
jne 0x53040
movq -0x70(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xbfe80
movq -0xc8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq $0x3, 0x10(%rax)
movq -0x90(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x8(%rbp), %rdi
callq 0xff990
movq -0x170(%rbp), %rdi
movq %rax, %rcx
movl $0x3, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
movl $0x22, %esi
leaq 0xe1197(%rip), %rdx     # 0x1341a4
callq 0x101530
movq -0x28(%rbp), %rdi
movq -0xd0(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xecab9(%rip), %rsi     # 0x13fae1
movb $0x0, %al
callq 0x43590
leaq -0xc8(%rbp), %rdi
callq 0xc06e0
jmp 0x53383
movq -0x10(%rbp), %rdi
callq 0x54810
testb $0x1, %al
jne 0x53052
jmp 0x5312b
movq -0x10(%rbp), %rax
movq %rax, -0x178(%rbp)
movabsq $-0x4db4989f9014f113, %rcx # imm = 0xB24B67606FEB0EED
subq %rcx, %rax
je 0x5309e
jmp 0x5306e
movq -0x178(%rbp), %rax
movabsq $-0x388c46b188de83fe, %rcx # imm = 0xC773B94E77217C02
subq %rcx, %rax
je 0x5309e
jmp 0x53086
movq -0x178(%rbp), %rax
movabsq $0x6d07f9ef5b68e8a2, %rcx # imm = 0x6D07F9EF5B68E8A2
subq %rcx, %rax
jne 0x530ff
jmp 0x5309e
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x44d00
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
je 0x530d6
movq -0x28(%rbp), %rdi
movq -0xd8(%rbp), %rdx
leaq 0xfbe58(%rip), %rsi     # 0x14ef25
movb $0x0, %al
callq 0x43590
jmp 0x530fd
movq -0x28(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xff780
movq -0x180(%rbp), %rdi
movq %rax, %rsi
callq 0x54c60
jmp 0x53126
movq -0x28(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xff780
movq -0x188(%rbp), %rdi
movq %rax, %rsi
callq 0x54c60
jmp 0x53381
movq -0x28(%rbp), %rdi
movl $0xa, %esi
callq 0x54c90
movq -0x10(%rbp), %rdi
callq 0x54870
testb $0x1, %al
jne 0x5314b
jmp 0x5327d
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x548a0
testb $0x1, %al
jne 0x53165
jmp 0x531aa
movq -0xe0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x54960
movq %rax, -0xe8(%rbp)
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
addq $0x1, %r9
leaq -0xe8(%rbp), %rdi
movabsq $0x6d07f9ef5b68e8a2, %rsi # imm = 0x6D07F9EF5B68E8A2
movabsq $-0x586bc610840563d3, %rdx # imm = 0xA79439EF7BFA9C2D
xorl %ecx, %ecx
callq 0x52d50
movq -0xe0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x549c0
movq %rax, -0xf0(%rbp)
movq $0x0, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0xf0(%rbp), %rax
jge 0x53278
movq -0xe0(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0xf8(%rbp), %rcx
leaq -0x110(%rbp), %rdi
callq 0x44940
movq -0x110(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x52c00
movq -0x190(%rbp), %rdi
movq %rax, %rsi
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
addq $0x1, %r9
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %ecx
callq 0x52d50
leaq -0x110(%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 -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x531cc
jmp 0x5336b
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ce70
movq %rax, -0x120(%rbp)
movq $0x0, -0x128(%rbp)
movq -0x128(%rbp), %rax
cmpq -0x120(%rbp), %rax
jge 0x53369
movq -0x118(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x128(%rbp), %rcx
leaq -0x140(%rbp), %rdi
callq 0x46220
movq -0x10(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0x4ce90
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x52c00
movq -0x198(%rbp), %rdi
movq %rax, %rsi
movq -0x148(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
addq $0x1, %r9
movl $0x1, %ecx
callq 0x52d50
leaq -0x140(%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 -0x128(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x128(%rbp)
jmp 0x532a3
jmp 0x5336b
movq -0x28(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0xe0755(%rip), %rsi     # 0x133acf
movb $0x0, %al
callq 0x43590
jmp 0x53383
jmp 0x53385
movq -0x28(%rbp), %rdi
leaq 0xec742(%rip), %rsi     # 0x13fad2
callq 0x54cc0
leaq -0x70(%rbp), %rdi
callq 0xc06e0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopw (%rax,%rax)