// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_stamp_s_parse
er_t xoico_stamp_s_parse( xoico_stamp_s* o, const xoico_host* host, x_source* source )
{
    // xoico_stamp.x:709:1
    BLM_INIT_LEVEL(0);
    xoico_compiler_s* compiler = o->group->compiler;
    bl_t verbatim = x_source_parse_bl(source," #?w'verbatim'" );
    
    st_s* st_stamp_name = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create()));
    
    x_source_point_s_setup_from_source(&(o->source_point),source );
    
    xoico_transient_map_s_copy(&(o->transient_map),&(o->group->transient_map ));
    
    BLM_TRY(xoico_group_s_parse_name_st(o->group,source, st_stamp_name ))
    
    if( !st_s_ends_in_sc(st_stamp_name,"_s" ) ) BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Stamp name '#<sc_t>' must end in '_s'.", st_stamp_name->sc ))
    
    if( x_source_parse_bl(source," #?'('" ) ) // functor args
    {BLM_INIT_LEVEL(1);
        xoico_args_s* args = ((xoico_args_s*)BLM_LEVEL_T_PUSH(1,xoico_args_s,xoico_args_s_create()));
        BLM_TRY(xoico_args_s_parse(args,host, source ))
        BLM_TRY(x_source_parse_fa(source," )" ))
    
        {const xoico_args_s* __a=args ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){const xoico_arg_s* e=__a->data[__i];
        {BLM_INIT_LEVEL(5);
            xoico_stamp_self_item_s* self_item = ((xoico_stamp_self_item_s*)BLM_LEVEL_T_PUSH(5,xoico_stamp_self_item_s,xoico_stamp_self_item_s_create()));
            self_item->arg_of_initializer = true;
            self_item->copy_from_initializer = ( e->typespec.access_class == TYPEOF_const );
    
            BLM_TRY(xoico_arg_s_to_self_item_st(e,((const xoico_host*)(o)),&( self_item->st )))
            x_source_point_s_copy(&(self_item->source_point),&(e->source_point ));
            x_array_push_d(((x_array*)(BCORE_PASS_CREATE(xoico_stamp_arr_self_item_s,o->arr_self_item))),((x_inst*)(((xoico_stamp_self_item_s*)bcore_fork(self_item)) )));
            o->has_compact_initializer = true;
        BLM_DOWN();}
    }}BLM_DOWN();}
    
    // using assignment symbol is optional
    if( x_source_parse_bl(source," #?'=' " ) )
    {
        // nothing (error in case use of assignment becomes illegal)
    }
    
    if( x_source_parse_bl(source," #?w'extending'" ) )
    {BLM_INIT_LEVEL(1);
        st_s* templ_name = ((st_s*)BLM_LEVEL_T_PUSH(1,st_s,st_s_create()));
        BLM_TRY(xoico_group_s_parse_name_st(o->group,source, templ_name ))
    
        if( !st_s_ends_in_sc(templ_name,"_s" ) )
        {
            BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Extending: Stamp name '#<sc_t>' must end in '_s'.", templ_name->sc ))
        }
    
        const xoico* item = xoico_compiler_s_get_const_item(compiler,btypeof( templ_name->sc ) );
        if( !item ) BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Template #<sc_t> not found.", templ_name->sc ))
        if( item->_ != ((tp_t)(TYPEOF_xoico_stamp_s)) ) BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Template #<sc_t> is no stamp.", templ_name->sc ))
        xoico_stamp_s_copy(o,((xoico_stamp_s*)(item)) );
    BLM_DOWN();}
    else if( !verbatim && o->group->extending_stamp )
    {
        xoico_stamp_s_copy(o,o->group->extending_stamp );
    }
    else
    {
        /// 'is_aware' is true by default
        if      ( x_source_parse_bl(source," #?w'obliv'" ) ) o->is_aware = false;
        else if ( x_source_parse_bl(source," #?w'aware'" ) ) o->is_aware = true;
        o->trait_name = o->group->tp_name;
    
        if( !x_source_parse_bl(source," #=?w'func'" ) && !x_source_parse_bl(source," #=?w'trans'" ) ) // if func follows, the brief-functor format was chosen
        {BLM_INIT_LEVEL(2);
            st_s st_trait_name;BLM_T_INIT_SPUSH(st_s, &st_trait_name);;
            BLM_TRY(xoico_group_s_parse_name_st(o->group,source,&( st_trait_name )))
            if( st_trait_name.size > 0 ) o->trait_name = xoico_compiler_s_entypeof(compiler,st_trait_name.sc );
        BLM_DOWN();}
    
        if( x_source_parse_bl(source," #?w'trans' " ) )
        {
            BLM_TRY(xoico_transient_map_s_parse_update(&(o->transient_map),((const xoico_host*)(o)), source ))
        }
    
    }
    
    st_s_copy(&(o->st_name),st_stamp_name );
    o->tp_name = xoico_compiler_s_entypeof(compiler,st_stamp_name->sc );
    BLM_TRY(xoico_stamp_s_parse_extend(o,source ))
    if( o->has_compact_initializer ) BLM_TRY(xoico_stamp_s_push_compact_initializer_func(o))
    
    BLM_RETURNV(er_t, 0)
}

er_t xoico_stamp_s_finalize( xoico_stamp_s* o, const xoico_host* host )
{
    // xoico_stamp.x:799:1
    BLM_INIT_LEVEL(0);
    //if( o.has_compact_initializer ) o.push_compact_initializer_func();
    
    if( o->finalized ) BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(o->source_point),"In stamp '#<sc_t>': Attempting to finalize stamp twice.", o->st_name.sc ))
    
    xoico_compiler_s* compiler = o->group->compiler;
    st_s self_buf;BLM_T_INIT_SPUSH(st_s, &self_buf);;
    
    bcore_self_item_s* first_array_item = NULL; // !=NULL if stamp has an array;
    {BLM_INIT_LEVEL(1);
        bcore_self_s* self = ((bcore_self_s*)BLM_LEVEL_T_PUSH(1,bcore_self_s,bcore_self_s_create())); self->type = o->tp_name; self->trait = o->trait_name;
        {const xoico_stamp_arr_self_item_s* __a=o->arr_self_item ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_stamp_self_item_s* self_item=&(__a->data[__i]);
        {BLM_INIT_LEVEL(5);
            bcore_self_item_s* item = ((bcore_self_item_s*)BLM_LEVEL_T_PUSH(5,bcore_self_item_s,bcore_self_item_s_create()));
            BLM_TRY(xoico_stamp_self_item_s_to_bcore_self_item(self_item,self, item ))
    
            if( xoico_compiler_s_is_group(compiler,item->type ) )
            {
                if( bcore_flect_caps_get_indirection( item->caps ) == 0 )
                {
                    BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(self_item->source_point),"Element is a group at indirection 0. Was a pointer intended?\n" ))
                }
    
                if(  !item->flags.f_aware  &&  !item->flags.f_obliv  && !bcore_flect_caps_is_typed( item->caps ) )
                {
                    /// group reference: when type awareness is not specified but 'aware' is a legal option, assume 'aware'.
                    st_s_insert_sc(&(self_item->st),0, "aware " );
                }
            }
    
            if( bcore_flect_caps_is_array( item->caps ) && !first_array_item ) first_array_item = ((bcore_self_item_s*)BLM_LEVEL_T_PUSH(0,bcore_self_item_s,bcore_self_item_s_clone(item)));
            st_s_push_st(&(self_buf),&(self_item->st ));
        BLM_DOWN();}
    }}BLM_DOWN();}
    
    // set transient classes for x_array
    if( o->trait_name == ((tp_t)(TYPEOF_x_array)) || o->trait_name == ((tp_t)(TYPEOF_bcore_array)) )
    {
        if( !first_array_item )
        {
            BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(o->source_point),"In stamp '#<sc_t>': Stamp is of trait 'x_array' but contains no array", o->st_name.sc ))
        }
        xoico_transient_map_s_set(&(o->transient_map),xoico_compiler_s_entypeof(compiler,"TO" ), o->tp_name );
        if( first_array_item->type ) xoico_transient_map_s_set(&(o->transient_map),xoico_compiler_s_entypeof(compiler,"TE" ), first_array_item->type );
    }
    
    // overload transient features
    {BLM_INIT_LEVEL(1);const bcore_arr_tp_s* __a=((bcore_arr_tp_s*)BLM_LEVEL_T_PUSH(1,bcore_arr_tp_s,xoico_transient_map_s_create_key_arr(&(o->transient_map)))) ;if(__a)for(sz_t __i=0;__i<__a->size;__i++){tp_t key=__a->data[__i];
    {
        const xoico_feature_s* feature = xoico_stamp_s_get_traitline_feature_from_name(o,key );
        if( feature )
        {BLM_INIT_LEVEL(5);
            if( !xoico_signature_s_fits_transient_type_feature(&(feature->signature)) )
            {BLM_INIT_LEVEL(6);
                st_s feature_reference;BLM_T_INIT_SPUSH(st_s, &feature_reference);;
                x_source_point_s_source_reference_to_sink(&(feature->source_point),false,((x_sink*)(&( feature_reference ))));
                BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(o->source_point),"In stamp '#<sc_t>': Stamp uses transient feature '#<sc_t>' with triggers automatic overload of a feature with this name in the stamps traitline.\n"
                    "A matching feature was found in '#<sc_t>' but it does not satisfy signature-requirements for such an overload.\n"
                    "Suggestions:\n"
                    "   - Define feature in the form 'feature tp_t #<sc_t>( @*o );'. Or\n"
                    "   - If the feature has a different purpose:\n"
                    "       - Rename the feature. Or\n"
                    "       - Rename the transient type identifier '#<sc_t>'.\n",
                    o->st_name.sc,
                    xoico_compiler_s_nameof(compiler,feature->signature.name ),
                    feature_reference.sc,
                    xoico_compiler_s_nameof(compiler,feature->signature.name ),
                    xoico_compiler_s_nameof(compiler,feature->signature.name )
                ))
            BLM_DOWN();}
    
            tp_t type = xoico_transient_map_s_get(&(o->transient_map),key );
    
            st_s func_code;BLM_T_INIT_SPUSH(st_s, &func_code);st_s_push_fa(&(func_code),"#<sc_t>.#<sc_t> { = TYPEOF_#<sc_t>; }",
                xoico_compiler_s_nameof(compiler,feature->group->tp_name ),
                xoico_compiler_s_nameof(compiler,feature->signature.name ),
                xoico_compiler_s_nameof(compiler,type )
            );
    
            BLM_TRY(xoico_stamp_s_push_internal_func_from_sc(o,func_code.sc ))
        BLM_DOWN();}
    }
    
    }BLM_DOWN();}{const xoico_wraps_s* __a=&(o->wraps );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_wrap_s* wrap=__a->data[__i];
    {
        BLM_TRY(xoico_wrap_s_finalize(wrap,((const xoico_host*)(o ))))
        x_array_push_d(((x_array*)(&(o->funcs))),((x_inst*)(((xoico_func_s*)bcore_fork(wrap->func)) )));
    }
    
    }}{const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i];
    {
        BLM_TRY(xoico_func_s_finalize(func,((const xoico_host*)(o ))))
        if( xoico_func_s_reflectable(func,((const xoico_host*)(o ))) ) BLM_TRY(xoico_func_s_push_flect_decl_to_sink(func,((const xoico_host*)(o)),((x_sink*)(&( self_buf )))))
        BLM_TRY(xoico_compiler_s_register_func(compiler,func ))
    }
    
    }}st_s_attach( &(o->self_source ),  st_s_create());
    st_s_push_fa(o->self_source,"#<sc_t> =", o->st_name.sc );
    if( o->is_aware ) st_s_push_sc(o->self_source,"aware " );
    st_s_push_sc(o->self_source,xoico_compiler_s_nameof(compiler,o->trait_name ) );
    st_s_push_fa(o->self_source,"{#<st_s*>}", (&(self_buf)) );
    
    bcore_self_s_attach( &(o->self ),  bcore_self_s_parse_source( ( bcore_source* )((x_source*)BLM_LEVEL_A_PUSH(0,x_source_create_from_st(o->self_source ))), 0, 0, o->group->st_name.sc, false ));
    
    // checking for repetitions in o.self (non-functions)
    bcore_hmap_tp_s* hmap_name = ((bcore_hmap_tp_s*)BLM_LEVEL_T_PUSH(0,bcore_hmap_tp_s,bcore_hmap_tp_s_create()));
    sz_t self_items = bcore_self_s_items_size( o->self );
    for(sz_t i = 0; i < self_items; i++ )
    {
        const bcore_self_item_s* item = bcore_self_s_get_item(o->self,i );
        if( item->name && ( item->caps != BCORE_CAPS_EXTERNAL_FUNC ) )
        {
            if( bcore_hmap_tp_s_exists(hmap_name,item->name ) )
            {
                BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(o->source_point),"In stamp '#<sc_t>': Repeated use of member name '#<sc_t>'.", o->st_name.sc, xoico_compiler_s_nameof(compiler,item->name ) ))
            }
    
            bcore_hmap_tp_s_set(hmap_name,item->name );
        }
    }
    
    // check validity of trait name
    if( !xoico_compiler_s_is_group(compiler,o->trait_name ) )
    {
        BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(o->source_point),"In stamp '#<sc_t>': Trait name '#<sc_t>' is not a group.", o->st_name.sc, xoico_compiler_s_nameof(compiler,o->trait_name ) ))
    }
    
    // update retrievability of groups in traitline
    for(tp_t trait_name = o->trait_name; trait_name != 0; )
    {
        const xoico_group_s* group = xoico_compiler_s_get_group(compiler,trait_name );
        trait_name = group->trait_name != group->tp_name ? group->trait_name : 0;
        if( group->is_retrievable ) bcore_arr_tp_s_push(BCORE_PASS_CREATE(bcore_arr_tp_s,group->retrievable_stamps),o->tp_name );
    }
    
    o->finalized = true;
    
    BLM_RETURNV(er_t, 0)
}

er_t xoico_stamp_s_expand_declaration( const xoico_stamp_s* o, const xoico_host* host, sz_t indent, x_sink* sink )
{
    // xoico_stamp.x:946:1
    
    sc_t sc_name = o->st_name.sc;
    
    x_sink_push_fa(sink,"#rn{ }##define TYPEOF_#<sc_t> 0x#pl16'0'{#X<tp_t>}ull\n", indent, sc_name, btypeof( sc_name ) );
    
    x_sink_push_fa(sink,"#rn{ }##define BETH_EXPAND_ITEM_#<sc_t>", indent, sc_name, sc_name );
    x_sink_push_fa(sink," \\\n#rn{ }  BCORE_DECLARE_OBJECT( #<sc_t> )", indent, sc_name );
    x_sink_push_fa(sink," \\\n" );
    
    bcore_self_s_struct_body_to_sink_newline_escaped( o->self, indent + 2, ( bcore_sink* )sink );
    x_sink_push_fa(sink,";" );
    
    {const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i]; BLM_TRY(xoico_func_s_expand_forward(func,((const xoico_host*)(o)), indent + 2, sink )) // expands all prototypes
    }}{const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i]; BLM_TRY(xoico_func_s_expand_declaration(func,((const xoico_host*)(o)), indent + 2, sink )) // only expands static inline functions
    
    }}x_sink_push_fa(sink,"\n" );
    return  0;
}

er_t xoico_stamp_s_expand_definition( const xoico_stamp_s* o, const xoico_host* host, sz_t indent, x_sink* sink )
{
    // xoico_stamp.x:968:1
    BLM_INIT_LEVEL(0);
    st_s* embedded_string = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,xoico_stamp_create_embedded_string(o->self_source )));
    
    // Issue below was mitigated by using nasc strings; error check can be removed
    // 4095 is the C99-limit for string literals
    //    if( embedded_string.size > 4095 )
    //    {
    //        return o.source_point.parse_error_fa
    //        (
    //            "Reflection embedding failed. (Stamp is too large)\n"
    //            "The embedded code would require a string literal larger than 4095 characters.\n"
    //            "This exceeds the limit defined in C99.\n"
    //        );
    //    }
    
    sz_t idx = st_s_find_char(embedded_string,0, -1, '=' );
    sc_t self_def = "";
    if( idx < embedded_string->size )
    {
        self_def = embedded_string->sc + idx + 1;
    }
    
    x_sink_push_fa(sink,"\n" );
    
    //   old code before nasc strings
    //    sink.push_fa( "#rn{ }BCORE_DEFINE_OBJECT_INST_P( #<sc_t> )\n", indent, o.st_name.sc );
    //    m st_s* multiline_string = xoico_stamp_create_structured_multiline_string( self_def, indent )^;
    //    sink.push_fa( "#<sc_t>;\n", multiline_string.sc );
    
    x_sink_push_fa(sink,"#rn{ }BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( #<sc_t> )\n", indent, o->st_name.sc );
    st_s* multiline_nasc_string = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,xoico_stamp_create_structured_multiline_string_nasc(self_def, indent )));
    x_sink_push_fa(sink,"#<sc_t>,\n", multiline_nasc_string->sc );
    x_sink_push_fa(sink,"#rn{ }BCORE_DEFINE_OBJECT_INST_P_NASC_END( #<sc_t> )\n", indent, o->st_name.sc );
    
    {const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i]; BLM_TRY(xoico_func_s_expand_definition(func,((const xoico_host*)(o)), indent, sink ))
    
    }}BLM_RETURNV(er_t, 0)
}

er_t xoico_stamp_s_expand_init1( const xoico_stamp_s* o, const xoico_host* host, sz_t indent, x_sink* sink )
{
    // xoico_stamp.x:1010:1
    
    xoico_compiler_s* compiler = o->group->compiler;
    
    {const xoico_funcs_s* __a=&(o->funcs );if(__a)for(sz_t __i=0;__i<__a->size;__i++){xoico_func_s* func=__a->data[__i];
    {
        if( xoico_func_s_reflectable(func,host ) )
        {
            const xoico_signature_s* signature = func->signature;
            x_sink_push_fa(sink,"#rn{ }BCORE_REGISTER_FFUNC( #<sc_t>, #<sc_t>_#<sc_t> );\n",
                indent,
                xoico_compiler_s_nameof(compiler,signature->global_name ),
                o->st_name.sc,
                xoico_compiler_s_nameof(compiler,func->name )
            );
        }
    }
    }}x_sink_push_fa(sink,"#rn{ }BCORE_REGISTER_OBJECT( #<sc_t> );\n", indent, o->st_name.sc );
    return  0;
}

BCORE_DEFINE_OBJECT_INST_P_NASC_BEGIN( xoico_stamp_self_item_s )
"aware xoico_stamp",
"{",
    "x_source_point_s source_point;",
    "st_s st;",
    "bl_t arg_of_initializer;",
    "bl_t copy_from_initializer;",
"}",
BCORE_DEFINE_OBJECT_INST_P_NASC_END( xoico_stamp_self_item_s )

er_t xoico_stamp_self_item_s_to_bcore_self_item( const xoico_stamp_self_item_s* o, const bcore_self_s* self, bcore_self_item_s* item )
{
    // xoico_stamp.x:140:5
    BLM_INIT_LEVEL(0);
    er_t er = bcore_self_item_s_parse_src( item, sr_awc(((const x_inst*)( ((x_source*)BLM_LEVEL_A_PUSH(0,x_source_create_from_st(&(o->st )))) ))), self, false );
    
    if( er )
    {BLM_INIT_LEVEL(1);
        st_s* msg = ((st_s*)BLM_LEVEL_T_PUSH(1,st_s,st_s_create()));
        bcore_error_pop_st((&(er)), msg );
        BLM_RETURNV(er_t, x_source_point_s_parse_error_fa(&(o->source_point),"#<sc_t>\n", msg->sc ))
    BLM_DOWN();}
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, %r15
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
leaq 0x1023c8(%rip), %rax    # 0x117dd0
movq (%rax), %rsi
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x717f5
andq $0x0, 0x10(%r12)
movq 0xc8(%r15), %rax
movq 0x140(%rax), %rax
movq %rax, 0x30(%rsp)
leaq 0x962e6(%rip), %rsi     # 0xabd1e
movq %r14, %rdi
callq 0xe5ff
movl %eax, %ebx
xorl %eax, %eax
callq 0x8eb65
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rax, %rcx
callq 0x71967
movq %rax, %r12
leaq 0xd0(%r15), %rdi
movq %r14, %rsi
callq 0xdc7d
leaq 0x98(%r15), %rbp
movl $0xe0, %esi
addq 0xc8(%r15), %rsi
movq %rbp, %rdi
callq 0xedc9
movq 0xc8(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x13d35
testq %rax, %rax
jne 0x15b8e
movq %r12, %r13
movq 0x10(%rsp), %r12
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rbp, 0x18(%rsp)
leaq 0xa37a9(%rip), %rsi     # 0xb9268
movq %r13, %rdi
callq 0x8f5ac
testb %al, %al
je 0x15b77
movq %r13, 0x40(%rsp)
leaq 0x94a5a(%rip), %rsi     # 0xaa535
movq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xe5ff
leaq 0xa8(%rsp), %rbp
testb %al, %al
movl %ebx, %r15d
je 0x15cba
movb %r15b, 0x7(%rsp)
movq %rbp, 0x8(%rsp)
leaq 0x48(%rsp), %rsi
movq %rbp, %rdi
callq 0x717f5
movq 0x8(%rsp), %r13
movq $0x1, 0x10(%r13)
callq 0xf59b
pushq $0x1
popq %rsi
movabsq $0x40f4054e83f33d09, %rdx # imm = 0x40F4054E83F33D09
movq %r13, %rdi
movq %rax, %rcx
callq 0x71967
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x10022
testq %rax, %rax
jne 0x15b6d
movq %r15, 0x10(%rsp)
leaq 0xb3388(%rip), %rsi     # 0xc8ee6
movq %r14, %rdi
xorl %eax, %eax
callq 0xd600
testq %rax, %rax
je 0x15bb0
movq %rax, %r13
movq 0x8(%rsp), %rdi
jmp 0x15b96
movq 0x8(%r13), %rdx
leaq 0x961b6(%rip), %rsi     # 0xabd38
movq 0x28(%rsp), %rdi
xorl %eax, %eax
callq 0xd7c4
movq %rax, %r13
leaq 0x48(%rsp), %rdi
callq 0x71b64
movq %r13, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
movq 0x20(%rsp), %r14
movb 0x7(%rsp), %r15b
je 0x15cab
xorl %r12d, %r12d
cmpq 0x10(%rcx), %r12
jae 0x15cab
movq 0x8(%rcx), %rax
movq (%rax,%r12,8), %r15
movq 0x8(%rsp), %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x717f5
movq 0x38(%rsp), %r13
movq $0x5, 0x10(%r13)
callq 0x19445
movq %r13, %rdi
pushq $0x5
popq %rsi
movabsq $-0x4a7225c98ee69178, %rdx # imm = 0xB58DDA3671196E88
movq %rax, %rcx
callq 0x71967
movq %rax, %rbp
movb $0x1, 0x40(%rax)
movabsq $0x65c9718e19e3df34, %rax # imm = 0x65C9718E19E3DF34
cmpq %rax, 0x30(%r15)
sete 0x41(%rbp)
leaq 0x20(%rbp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xf401
testq %rax, %rax
jne 0x15f86
leaq 0x8(%rbp), %rdi
addq $0x8, %r15
movq %r15, %rsi
callq 0x2dd98
movq 0x40(%r14), %r15
testq %r15, %r15
jne 0x15c71
callq 0x194bf
movq %rax, %r15
movq %rax, 0x40(%r14)
movq %rbp, %rdi
callq 0x6026d
movq %r15, %rdi
movq %rax, %rsi
callq 0xf6dd
movb $0x1, 0x39(%r14)
leaq 0x38(%rsp), %rdi
callq 0x71b48
incq %r12
leaq 0xa8(%rsp), %rbp
movl %ebx, %r15d
movq 0x10(%rsp), %rcx
jmp 0x15bcb
leaq 0x8(%rsp), %rdi
callq 0x71b48
movq 0x28(%rsp), %r14
leaq 0x95516(%rip), %rsi     # 0xab1d7
movq %r14, %rdi
callq 0xe5ff
leaq 0x954a3(%rip), %rsi     # 0xab173
movq %r14, %rdi
callq 0xe5ff
testb %al, %al
movq %r14, %rbx
je 0x15db1
movq %rbp, 0x78(%rsp)
leaq 0x48(%rsp), %rsi
movq %rbp, %rdi
callq 0x717f5
movq $0x1, 0xb8(%rsp)
xorl %eax, %eax
callq 0x8eb65
pushq $0x1
popq %rsi
movq %rbp, %rdi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
movq %rax, %rcx
callq 0x71967
movq %rax, %r15
movq 0x20(%rsp), %r14
movq 0xc8(%r14), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x13d35
movq %rax, %r13
testq %rax, %rax
movq 0x40(%rsp), %r12
jne 0x15fb8
leaq 0xa3516(%rip), %rsi     # 0xb9268
movq %r15, %rdi
callq 0x8f5ac
movq 0x8(%r15), %rdx
testb %al, %al
je 0x15f7d
movq %rdx, %rdi
callq 0x10aad
movq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x162bb
testq %rax, %rax
je 0x15f93
movabsq $0x12d01d78049fae7, %rcx # imm = 0x12D01D78049FAE7
cmpq %rcx, (%rax)
jne 0x15fa0
movq %r14, %rdi
movq %rax, %rsi
callq 0x17880
leaq 0x78(%rsp), %rdi
callq 0x71b48
jmp 0x15f19
testb %r15b, %r15b
movabsq $-0x503db0e6e1c2e704, %r13 # imm = 0xAFC24F191E3D18FC
movq 0x20(%rsp), %r14
movq 0x40(%rsp), %r12
jne 0x15dea
movq 0xc8(%r14), %rax
movq 0x110(%rax), %rsi
testq %rsi, %rsi
je 0x15dea
movq %r14, %rdi
callq 0x17880
jmp 0x15f19
leaq 0x943a9(%rip), %rsi     # 0xaa19a
movq %rbx, %rdi
callq 0xe5ff
testb %al, %al
je 0x15e06
xorl %ecx, %ecx
movq 0x18(%rsp), %r15
jmp 0x15e20
leaq 0x94399(%rip), %rsi     # 0xaa1a6
movq %rbx, %rdi
callq 0xe5ff
movb $0x1, %cl
testb %al, %al
movq 0x18(%rsp), %r15
je 0x15e24
movb %cl, 0x38(%r14)
movq 0xc8(%r14), %rax
movq 0xa8(%rax), %rax
movq %rax, 0x30(%r14)
leaq 0x95f22(%rip), %rsi     # 0xabd5f
movq %rbx, %rdi
callq 0xe5ff
testb %al, %al
jne 0x15eef
leaq 0x95f17(%rip), %rsi     # 0xabd6b
movq %rbx, %rdi
callq 0xe5ff
testb %al, %al
jne 0x15eef
movq %rbp, 0x8(%rsp)
leaq 0x48(%rsp), %rsi
movq %rbp, %rdi
callq 0x717f5
movq $0x2, 0xb8(%rsp)
leaq 0x78(%rsp), %r15
movq %r15, %rdi
callq 0x8e048
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x71998
movq 0xc8(%r14), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x13d35
testq %rax, %rax
jne 0x15fb5
cmpq $0x0, 0x88(%rsp)
je 0x15ee0
movq 0x80(%rsp), %rsi
movq 0x30(%rsp), %rax
leaq 0x140(%rax), %rdi
callq 0x6f48c
movq %rax, 0x30(%r14)
leaq 0x8(%rsp), %rdi
callq 0x71b48
movq 0x18(%rsp), %r15
leaq 0x952fc(%rip), %rsi     # 0xab1f2
movq %rbx, %rdi
callq 0xe5ff
testb %al, %al
je 0x15f19
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xeef1
testq %rax, %rax
jne 0x15b8e
leaq 0x8(%r14), %rdi
movq %r12, %rsi
callq 0x8e4fd
movq 0x8(%r12), %rsi
movq 0x30(%rsp), %rdi
addq $0x140, %rdi            # imm = 0x140
callq 0x6f48c
movq %rax, 0x28(%r14)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17aa9
testq %rax, %rax
jne 0x15b8e
cmpb $0x1, 0x39(%r14)
jne 0x15f6b
movq %r14, %rdi
callq 0x18038
testq %rax, %rax
jne 0x15b8e
leaq 0x48(%rsp), %rdi
callq 0x71b64
xorl %r13d, %r13d
jmp 0x15b9b
leaq 0x95da9(%rip), %rsi     # 0xabd2d
jmp 0x15fab
movq %rax, %r13
movq 0x38(%rsp), %rdi
jmp 0x15b96
movq 0x8(%r15), %rdx
leaq 0x951f2(%rip), %rsi     # 0xab190
jmp 0x15fab
movq 0x8(%r15), %rdx
leaq 0x95201(%rip), %rsi     # 0xab1ac
movq %rbx, %rdi
xorl %eax, %eax
callq 0xd7c4
movq %rax, %r13
leaq 0xa8(%rsp), %rdi
jmp 0x15b96