// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: bcore_main_set_s_main
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_main_set_s )

er_t bcore_main_set_s_main( bcore_main_set_s* o, bcore_main_frame_s* frame )
{
    // bcore_main.h:141:5
    
    {const bcore_main_arr_s* __a=&(o->arr );if(__a)for(sz_t __i=0;__i<__a->size;__i++){bcore_main* e=__a->data[__i];
    {
        {BLM_INIT_LEVEL(5);
            bcore_lock_s lock;BLM_T_INIT_SPUSH(bcore_lock_s, &lock);bcore_lock_s_set(&(lock),&(o->mutex_current_object ));
            o->current_object = e;
        BLM_DOWN();}
        if( !bcore_main_defines_main(e) ) return  bcore_error_push_fa(TYPEOF_general_error, "#<sc_t>.main: Object '#<sc_t>' does not define callback feature bcore_main.main", ifnameof( ((tp_t)(TYPEOF_bcore_main_set_s)) ), ifnameof( e->_ ) );
        BLM_TRY(bcore_main_a_main(e,frame ) )
    };}}
    o->current_object = NULL;
    return  0;
}

bl_t bcore_main_set_s_on_termination( bcore_main_set_s* o, const bcore_main_frame_s* frame )
{
    // bcore_main.h:156:5
    BLM_INIT_LEVEL(0);
    bcore_lock_s lock;BLM_T_INIT_SPUSH(bcore_lock_s, &lock);bcore_lock_s_set(&(lock),&(o->mutex_current_object ));
    BLM_RETURNV(bl_t, o->current_object ? bcore_main_a_on_termination(o->current_object,frame ) : false)
}

bl_t bcore_main_set_s_on_interrupt( bcore_main_set_s* o, const bcore_main_frame_s* frame )
{
    // bcore_main.h:162:5
    BLM_INIT_LEVEL(0);
    bcore_lock_s lock;BLM_T_INIT_SPUSH(bcore_lock_s, &lock);bcore_lock_s_set(&(lock),&(o->mutex_current_object ));
    BLM_RETURNV(bl_t, o->current_object ? bcore_main_a_on_interrupt(o->current_object,frame ) : false)
}

bl_t bcore_main_set_s_on_suspend( bcore_main_set_s* o, const bcore_main_frame_s* frame )
{
    // bcore_main.h:168:5
    BLM_INIT_LEVEL(0);
    bcore_lock_s lock;BLM_T_INIT_SPUSH(bcore_lock_s, &lock);bcore_lock_s_set(&(lock),&(o->mutex_current_object ));
    BLM_RETURNV(bl_t, o->current_object ? bcore_main_a_on_suspend(o->current_object,frame ) : false)
}

XOILA_DEFINE_SPECT_NASC_BEGIN( bcore_inst, bcore_main )
"{",
    "bcore_spect_header_s header;",
    "feature aware bcore_main : main;",
    "feature aware bcore_main : on_termination = bcore_main_on_termination_default;",
    "feature aware bcore_main : on_interrupt = bcore_main_on_interrupt_default;",
    "feature aware bcore_main : on_suspend = bcore_main_on_suspend_default;",
"}",
XOILA_DEFINE_SPECT_NASC_END( bcore_inst, bcore_main )

/**********************************************************************************************************************/
// source: bcore_hmap_name.h
#include "bcore_hmap_name.h"

//----------------------------------------------------------------------------------------------------------------------
// group: bcore_hmap_name

BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( bcore_hmap_name_s )
"aware bcore_inst",
"{",
    "bcore_hmap_tp_sr_s map;",
"}",
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_hmap_name_s )

XOILA_DEFINE_SPECT_NASC_BEGIN( bcore_inst, bcore_hmap_name )
"{",
    "bcore_spect_header_s header;",
"}",
XOILA_DEFINE_SPECT_NASC_END( bcore_inst, bcore_hmap_name )

/**********************************************************************************************************************/
// source: bcore_hmap_tp_st.h
#include "bcore_hmap_tp_st.h"

//----------------------------------------------------------------------------------------------------------------------
// group: bcore_hmap_tp_st

BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( bcore_hmap_tp_st_s )
"aware bcore_inst",
"{",
    "bcore_hmap_tpaw_s map;",
"}",
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_hmap_tp_st_s )

XOILA_DEFINE_SPECT_NASC_BEGIN( x_inst, bcore_hmap_tp_st )
"{",
    "bcore_spect_header_s header;",
"}",
XOILA_DEFINE_SPECT_NASC_END( x_inst, bcore_hmap_tp_st )

/**********************************************************************************************************************/
// source: bcore_cday.h
#include "bcore_cday.h"

//----------------------------------------------------------------------------------------------------------------------
// group: bcore_cday

BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( bcore_cday_ymd_s )
"aware bcore_cday",
"{",
    "s2_t y;",
    "s2_t m;",
    "s2_t d;",
"}",
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_cday_ymd_s )

BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( bcore_cday_utc_s )
"aware bcore_cday",
"{",
    "s2_t cday;",
    "s2_t ms;",
"}",
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_cday_utc_s )

XOILA_DEFINE_SPECT_NASC_BEGIN( bcore_inst, bcore_cday )
"{",
    "bcore_spect_header_s header;",
"}",
XOILA_DEFINE_SPECT_NASC_END( bcore_inst, bcore_cday )

/**********************************************************************************************************************/
// source: bcore_error_manager.h
#include "bcore_error_manager.h"

//----------------------------------------------------------------------------------------------------------------------
// group: bcore_error
#include "bcore_x_array.h"

XOILA_DEFINE_SPECT_NASC_BEGIN( bcore_inst, bcore_error )
"{",
    "bcore_spect_header_s header;",
"}",
XOILA_DEFINE_SPECT_NASC_END( bcore_inst, bcore_error )

//----------------------------------------------------------------------------------------------------------------------
// group: bcore_error_manager

BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( bcore_error_manager_error_s )
"aware bcore_error_manager",
"{",
    "er_t id;",
    "st_s msg;",
"}",
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_error_manager_error_s )

BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( bcore_error_manager_error_adl_s )
"aware x_array",
"{",
    "bcore_error_manager_error_s => [];",
"}",
BCORE_DEFINE_OBJECT_INST_P_NASC_END( bcore_error_manager_error_adl_s )

bcore_error_manager_error_adl_s* bcore_error_manager_error_adl_s_set_size( bcore_error_manager_error_adl_s* o, sz_t size )
{
    // bcore_error_manager.h:47:9
    
    return  ((bcore_error_manager_error_adl_s*)(x_array_set_size(((x_array*)( o)),size )));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
setne %bpl
je 0x61a0b
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rsp)
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %r14
leaq 0x14760b(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xe0431
movq 0x10(%rsp), %r12
movq $0x5, 0x10(%r12)
leaq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x11f65b
movq %r12, %rdi
movabsq $0x5f28c34c85940ebe, %rsi # imm = 0x5F28C34C85940EBE
movq %r13, %rdx
callq 0xe06ab
movq %r13, %rdi
movq 0x20(%rsp), %rsi
callq 0x11f5bf
movq %r14, 0x28(%rbx)
leaq 0x10(%rsp), %rdi
callq 0xe0b11
movq (%r14), %r13
movl 0x14369d(%rip), %eax    # 0x1a4ec8
cltq
leaq (%rax,%rax,2), %rax
leaq 0x143690(%rip), %rdx    # 0x1a4ec8
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x61889
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x61889
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x61889
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x619fb
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x618b9
movabsq $0x6b2e883bcd2d246e, %rdi # imm = 0x6B2E883BCD2D246E
movq %r13, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x14361a(%rip), %rdi    # 0x1a4ec8
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
cmpq $0x0, 0x10(%r12)
je 0x6198e
movq (%r14), %r13
movl 0x1435fa(%rip), %eax    # 0x1a4ec8
cltq
leaq (%rax,%rax,2), %rax
leaq 0x1435ed(%rip), %rdx    # 0x1a4ec8
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x6192c
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x6192c
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x6192c
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x61a03
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x6195c
movabsq $0x6b2e883bcd2d246e, %rdi # imm = 0x6B2E883BCD2D246E
movq %r13, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x143577(%rip), %rdi    # 0x1a4ec8
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r14, %rdi
movq 0x18(%rsp), %rsi
callq *0x10(%r12)
testq %rax, %rax
sete %r13b
je 0x619e3
movq %rax, %r14
leaq 0x147454(%rip), %rax    # 0x1a8dd0
movq (%rax), %rdi
callq 0xe0b30
xorl %r13d, %r13d
movq %r14, 0x8(%rsp)
jmp 0x619e3
movabsq $0x3503376aec71546f, %rdi # imm = 0x3503376AEC71546F
callq 0xe0cbc
movq %rax, %r12
testq %rax, %rax
leaq 0xf1d45(%rip), %r13     # 0x1536ef
cmoveq %r13, %r12
movq (%r14), %rdi
callq 0xe0cbc
testq %rax, %rax
cmoveq %r13, %rax
xorl %r13d, %r13d
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0xe0d4b(%rip), %rsi     # 0x14271c
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xc87b0
movq %rax, 0x8(%rsp)
testb %r13b, %r13b
je 0x61a0b
incq %r15
cmpq 0x18(%rbx), %r15
setb %bpl
jb 0x617b6
jmp 0x61a0b
xorl %r12d, %r12d
jmp 0x6188d
xorl %r12d, %r12d
jmp 0x61930
testb $0x1, %bpl
movq 0x8(%rsp), %rax
jne 0x61a20
movq $0x0, 0x28(%rbx)
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq