// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/lib/bcore/bcore_sinks.c
// Function: bcore_sinks_signal_handler
vd_t bcore_sinks_signal_handler( const bcore_signal_s* o )
{
    switch( bcore_signal_s_handle_type( o, typeof( "bcore_sinks" ) ) )
    {
        case TYPEOF_init1:
        {
            bcore_flect_define_creator( typeof( "bcore_sink_buffer_s" ), buffer_s_create_self );
            bcore_flect_define_creator( typeof( "bcore_sink_file_s"   ), file_s_create_self   );
            bcore_flect_define_creator( typeof( "bcore_sink_chain_s"  ), chain_s_create_self  );

            BCORE_REGISTER_FFUNC( bcore_fp_flow_snk, bcore_sink_stdout_s_push_data );
            BCORE_REGISTER_FFUNC( bcore_sink_fp_flush, bcore_sink_stdout_s_flush );
            BCORE_REGISTER_OBJECT( bcore_sink_stdout_s );
            BCORE_REGISTER_FFUNC( bcore_fp_flow_snk, bcore_sink_stderr_s_push_data );
            BCORE_REGISTER_FFUNC( bcore_sink_fp_flush, bcore_sink_stderr_s_flush );
            BCORE_REGISTER_OBJECT( bcore_sink_stderr_s );
            BCORE_REGISTER_FFUNC( bcore_fp_flow_snk, bcore_sink_nul_s_push_data );
            BCORE_REGISTER_FFUNC( bcore_sink_fp_flush, bcore_sink_nul_s_flush );
            BCORE_REGISTER_OBJECT( bcore_sink_nul_s );

            bcore_sink_stdout_g = bcore_sink_stdout_s_create();
            bcore_sink_stderr_g = bcore_sink_stderr_s_create();
            bcore_sink_nul_g    = bcore_sink_nul_s_create();
        }
        break;

        case TYPEOF_down1:
        {
             bcore_sink_stdout_s_detach( &bcore_sink_stdout_g );
             bcore_sink_stderr_s_detach( &bcore_sink_stderr_g );
             bcore_sink_nul_s_detach( &bcore_sink_nul_g );
        }

        case TYPEOF_selftest:
        {
        }
        break;

        default: break;
    }

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movabsq $0x11acca03f655c9fd, %rsi # imm = 0x11ACCA03F655C9FD
callq 0xe9c93
movabsq $-0x69a05654ee793a14, %rcx # imm = 0x965FA9AB1186C5EC
cmpq %rcx, %rax
je 0xec595
movabsq $0x6a72ce8f8250efc6, %rcx # imm = 0x6A72CE8F8250EFC6
cmpq %rcx, %rax
jne 0xec5d0
leaq 0x25e(%rip), %rsi       # 0xec5de
movabsq $-0x741f65139500cd47, %rdi # imm = 0x8BE09AEC6AFF32B9
callq 0xcf6c4
leaq 0x2db(%rip), %rsi       # 0xec671
movabsq $-0x6d20f1f66d46b377, %rdi # imm = 0x92DF0E0992B94C89
callq 0xcf6c4
leaq 0x37d(%rip), %rsi       # 0xec729
movabsq $-0x35e1677e729e85ac, %rdi # imm = 0xCA1E98818D617A54
callq 0xcf6c4
leaq 0x662e8(%rip), %r14     # 0x1526aa
movq %r14, %rdi
callq 0xe1270
movq %rax, %r15
leaq 0x662f4(%rip), %rbx     # 0x1526c8
movq %rbx, %rdi
callq 0xe1270
movq %r15, %rdi
movq %rax, %rsi
callq 0x121b6d
movq %r14, %rdi
callq 0xe1270
leaq -0xa0e(%rip), %rsi      # 0xeb9e8
movq %rax, %rdi
callq 0xd1091
leaq 0x662d5(%rip), %r15     # 0x1526da
movq %r15, %rdi
callq 0xe1270
movq %rax, %r12
leaq 0x662dd(%rip), %r14     # 0x1526f4
movq %r14, %rdi
callq 0xe1270
movq %r12, %rdi
movq %rax, %rsi
callq 0x121b6d
movq %r15, %rdi
callq 0xe1270
leaq -0xa74(%rip), %rsi      # 0xeb9c5
movq %rax, %rdi
callq 0xd1091
leaq 0x3b6(%rip), %rsi       # 0xec7fe
movabsq $0x3c1cd004d3edcacc, %rdi # imm = 0x3C1CD004D3EDCACC
callq 0xcf6c4
leaq 0x662aa(%rip), %r15     # 0x152708
movq %r15, %rdi
callq 0xe1270
movq %rax, %r12
movq %rbx, %rdi
callq 0xe1270
movq %r12, %rdi
movq %rax, %rsi
callq 0x121b6d
movq %r15, %rdi
callq 0xe1270
leaq -0xded55(%rip), %rsi    # 0xd736
movq %rax, %rdi
callq 0xd1091
leaq 0x6628c(%rip), %r15     # 0x152726
movq %r15, %rdi
callq 0xe1270
movq %rax, %r12
movq %r14, %rdi
callq 0xe1270
movq %r12, %rdi
movq %rax, %rsi
callq 0x121b6d
movq %r15, %rdi
callq 0xe1270
leaq -0x62d(%rip), %rsi      # 0xebe9a
movq %rax, %rdi
callq 0xd1091
leaq 0x33e(%rip), %rsi       # 0xec814
movabsq $0x3409fba69308505b, %rdi # imm = 0x3409FBA69308505B
callq 0xcf6c4
leaq 0x66254(%rip), %r15     # 0x152740
movq %r15, %rdi
callq 0xe1270
movq %rax, %r12
movq %rbx, %rdi
callq 0xe1270
movq %r12, %rdi
movq %rax, %rsi
callq 0x121b6d
movq %r15, %rdi
callq 0xe1270
leaq -0x1e1(%rip), %rsi      # 0xec338
movq %rax, %rdi
callq 0xd1091
leaq 0x66233(%rip), %rbx     # 0x15275b
movq %rbx, %rdi
callq 0xe1270
movq %rax, %r15
movq %r14, %rdi
callq 0xe1270
movq %r15, %rdi
movq %rax, %rsi
callq 0x121b6d
movq %rbx, %rdi
callq 0xe1270
leaq -0x221(%rip), %rsi      # 0xec334
movq %rax, %rdi
callq 0xd1091
leaq 0x2c6(%rip), %rsi       # 0xec82a
movabsq $0x7a3a94c5ff99836, %rdi # imm = 0x7A3A94C5FF99836
callq 0xcf6c4
callq 0xeb790
movq %rax, 0xbc869(%rip)     # 0x1a8de8
callq 0xebc65
movq %rax, 0xbc865(%rip)     # 0x1a8df0
callq 0xec0ff
movq %rax, %rbx
jmp 0xec5c9
movq 0xbc84c(%rip), %rdi     # 0x1a8de8
callq 0xeb83f
xorl %ebx, %ebx
movq %rbx, 0xbc83e(%rip)     # 0x1a8de8
movq 0xbc83f(%rip), %rdi     # 0x1a8df0
callq 0xebd14
movq %rbx, 0xbc833(%rip)     # 0x1a8df0
movq 0xbc834(%rip), %rdi     # 0x1a8df8
callq 0xec1ae
movq %rbx, 0xbc828(%rip)     # 0x1a8df8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq