// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: bcore_shell_op_default_enter_s_run
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_shell_op_default_enter_s )

void bcore_shell_op_default_enter_s_run( bcore_shell_op_default_enter_s* o, bcore_shell* obj, const bcore_main_frame_s* main_frame, x_source* source, bcore_sink* sink, bcore_shell_control_s* control )
{
    // bcore_shell.h:532:9
    BLM_INIT_LEVEL(0);
    const x_stamp_path_s* path = x_stamp_path_s_parse(((x_stamp_path_s*)BLM_LEVEL_T_PUSH(0,x_stamp_path_s,x_stamp_path_s_create())),((x_source*)BLM_LEVEL_A_PUSH(0,x_source_create_from_st(&(o->path )))) );
    if( path->size == 0 )
    {
        bcore_sink_a_push_fa(sink,"Path '#<sc_t>' not found.\n", o->path.sc );
        BLM_RETURN();
    }
    sr_s sr;BLM_T_INIT_SPUSH(sr_s, &sr);;
    sr = x_stamp_path_s_get_sr_in(path,((const x_inst*)(obj )));
    bcore_shell* shell_o =((bcore_shell*)( sr.o));
    tp_t shell_t = sr_s_type(&(sr));
    
    if( shell_o )
    {BLM_INIT_LEVEL(1);
        if( !x_stamp_t_is_aware(shell_t ) )
        {
            bcore_sink_a_push_fa(sink,"Selected object '#<sc_t>' is oblivious. Cannot enter.\n", bnameof( shell_t ) );
            BLM_RETURN();
        }
    
        bcore_shell_control_s* control_child = ((bcore_shell_control_s*)BLM_LEVEL_T_PUSH(1,bcore_shell_control_s,bcore_shell_control_s_spawn(control)));
        if( control_child->path.size ) st_s_push_sc(&(control_child->path),"|" );
        st_s_push_st(&(control_child->path),&(o->path ));
        x_source_a_attach( &(control_child->source ), (x_source*)( ((x_source*)bcore_fork(source))));
        x_sink_a_attach( &(control_child->sink ), (x_sink*)( ((bcore_sink*)bcore_fork(sink))));
        BLM_TRY_EXIT(bcore_shell_loop(shell_o,main_frame, control_child ))
    BLM_DOWN();}
    else
    {
        bcore_sink_a_push_fa(sink,"Path '#<sc_t>' not found.\n", o->path.sc );
    }
    BLM_DOWN();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r12
movq %rcx, 0x18(%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
leaq 0xe4ea5(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x60(%rsp), %rbx
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x717f5
andq $0x0, 0x10(%rbx)
callq 0x2ecc2
movabsq $-0x74dceedd59a2bd6f, %rdx # imm = 0x8B231122A65D4291
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movq %rax, %r15
leaq 0x8(%r14), %rdi
movq %rdi, 0x8(%rsp)
callq 0x76c69
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x71a90
movq %r15, %rdi
movq %rax, %rsi
callq 0x2edcf
cmpq $0x0, 0x10(%r15)
je 0x32ff7
movq %r13, (%rsp)
movq %r12, %r13
leaq 0x90(%rsp), %r12
movq %r12, %rdi
callq 0x8d1bc
leaq 0x60(%rsp), %rdi
movabsq $0x79b76918ff0af12a, %rsi # imm = 0x79B76918FF0AF12A
movq %r12, %rdx
callq 0x71998
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x2fefc
movq 0x10(%rbx), %rax
movq %rax, 0x10(%r12)
movups (%rbx), %xmm0
movaps %xmm0, (%r12)
movq (%r12), %rbp
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x33016
movq 0x8(%rax), %r15
jmp 0x33019
movq 0x10(%r14), %rdx
leaq 0x81c14(%rip), %rsi     # 0xb4c16
movq %r12, %rdi
xorl %eax, %eax
callq 0x87cf1
leaq 0x60(%rsp), %rdi
jmp 0x33151
xorl %r15d, %r15d
testq %rbp, %rbp
je 0x3310f
movq %rbx, 0x20(%rsp)
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x717f5
movq $0x1, 0x40(%rsp)
movq %r15, %rdi
callq 0x2dd1e
testb %al, %al
je 0x33130
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x3297c
movq %rbx, 0x8(%rax)
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rsi
movabsq $0x65568789b6f2bdaf, %rdx # imm = 0x65568789B6F2BDAF
movq %rax, %rcx
callq 0x71967
movq %rax, %r14
leaq 0x90(%rax), %rbx
cmpq $0x0, 0xa0(%rax)
je 0x3309b
leaq 0x777c1(%rip), %rsi     # 0xaa854
movq %rbx, %rdi
callq 0x8f392
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x8f23a
leaq 0x18(%r14), %rbx
movq 0x18(%rsp), %rdi
callq 0x6026d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3264f
movq %r14, %rbx
addq $0x10, %rbx
movq %r13, %rdi
callq 0x6026d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x32682
movq %rbp, %rdi
movq (%rsp), %rsi
movq %r14, %rdx
callq 0x3235e
testq %rax, %rax
je 0x33103
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x71b64
movl %ebx, %edi
callq 0x2dc20
leaq 0x20(%rsp), %rdi
callq 0x71b48
jmp 0x33124
movq 0x10(%r14), %rdx
leaq 0x81afc(%rip), %rsi     # 0xb4c16
movq %r13, %rdi
xorl %eax, %eax
callq 0x87cf1
leaq 0x28(%rsp), %rdi
callq 0x71b48
jmp 0x33156
movq %r15, %rdi
callq 0x71db6
leaq 0x81af2(%rip), %rsi     # 0xb4c31
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x87cf1
leaq 0x30(%rsp), %rdi
callq 0x71b64
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq