// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_txt_ml.c
// Function: interpret_embedded_file
static sr_s interpret_embedded_file( const bcore_txt_ml_interpreter_s* o, sr_s source )
{
    BLM_INIT();
    sr_s src_l = BLM_X_PUSH( source );

    sr_s interpreter_obj = sr_null();

    st_s* st_file = NULL;

    if( bcore_source_r_parse_bl_fa( &src_l, " #=?'\"'" ) )
    {
        interpreter_obj = sr_awc( o );
        st_file = st_s_create();
        bcore_source_r_parse_fa( &src_l, "#string", st_file );
    }
    else if( bcore_source_r_parse_bl_fa( &src_l, " #=?'<st_s>'" ) )
    {
        interpreter_obj = sr_awc( o );
        sr_s file_obj = interpret( o, sr_null(), src_l );
        if( sr_s_type( &file_obj ) != TYPEOF_st_s ) bcore_source_r_parse_errf( &src_l, "String with file path expected." );
        st_file = sr_fork( file_obj ).o;
    }
    else
    {
        interpreter_obj = interpret( o, sr_null(), src_l );
    }

    if( !interpreter_obj.o )
    {
        bcore_source_r_parse_err_fa( &src_l, "No interpreter specified." );
    }

    {
        st_s* log = BLM_CREATE( st_s );
        if( !bcore_trait_satisfied_type( typeof( "bcore_interpreter" ), sr_s_type( &interpreter_obj ), log ) )
        {
            bcore_source_x_parse_err_fa
            (
                src_l,
                "Object '#<sc_t>' is no interpreter.\nReason: #<sc_t>",
                ifnameof( sr_s_type( &interpreter_obj ) ),
                log->sc
            );
        }
    }

    bcore_source_r_parse_fa( &src_l, " </>" );

    if( st_file->size == 0 )  bcore_source_r_parse_errf( &src_l, "Invalid file path." );

    if( st_file->sc[ 0 ] != '/' ) // make path relative to current file path
    {
        st_s* cur_file = st_s_create_sc( bcore_source_r_get_file( &src_l ) );
        if( cur_file->size > 0 )
        {
            uz_t idx = st_s_find_char( cur_file, cur_file->size, 0, '/' );
            if( idx < cur_file->size )
            {
                cur_file->data[ idx ] = 0;
                st_s* new_file = st_s_create_fa( "#<sc_t>/#<sc_t>", cur_file->sc, st_file->sc );
                st_s_discard( st_file );
                st_file = new_file;
            }
        }
        st_s_discard( cur_file );
    }

    sr_s sub_source = sr_asm( bcore_source_chain_s_create() );
    bcore_source_chain_s_push_d( sub_source.o, bcore_source_file_s_create_name( st_file->sc ) );
    bcore_source_chain_s_push_d( sub_source.o, bcore_inst_t_create( typeof( "bcore_source_string_s" ) ) );

    sr_s obj = bcore_interpret_x( interpreter_obj, sub_source );

    st_s_discard( st_file );

    BLM_RETURNV( sr_s, obj );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x190(%rbp)
movq %rdi, -0x188(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x180(%rbp)
movq %rsi, -0x8(%rbp)
leaq 0x997a1(%rip), %rax     # 0x1b2330
movq (%rax), %rax
movq %rax, -0x10(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xbfe80
movq -0x180(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xc02c0
leaq -0x78(%rbp), %rdi
callq 0x119b10
movq $0x0, -0x80(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0x26e7b(%rip), %rsi     # 0x13fa77
callq 0x118af0
testb $0x1, %al
jne 0x118c07
jmp 0x118c5e
movq -0x8(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x115b50
movq -0x98(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x68(%rbp)
movb $0x0, %al
callq 0xff2e0
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdx
leaq -0x60(%rbp), %rdi
leaq 0x1b95f(%rip), %rsi     # 0x1345b1
movb $0x0, %al
callq 0xf3f70
jmp 0x118e04
leaq -0x60(%rbp), %rdi
leaq 0x3fcd7(%rip), %rsi     # 0x158940
callq 0x118af0
testb $0x1, %al
jne 0x118c77
jmp 0x118d79
movq -0x8(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x115b50
movq -0xb0(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x119b10
movq -0x198(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
leaq -0xe0(%rbp), %rcx
leaq -0x60(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x116310
leaq -0xc8(%rbp), %rdi
callq 0x116ff0
movabsq $-0x503db0e6e1c2e704, %rcx # imm = 0xAFC24F191E3D18FC
cmpq %rcx, %rax
je 0x118d3d
leaq -0x60(%rbp), %rdi
leaq 0x3fc17(%rip), %rsi     # 0x15894d
movb $0x0, %al
callq 0xf41c0
leaq -0xf8(%rbp), %rdi
leaq -0xc8(%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 0x119800
movq -0xf8(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x118e02
movq -0x8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x119b10
movq -0x1a0(%rbp), %rsi
leaq -0x110(%rbp), %rdi
leaq -0x128(%rbp), %rcx
leaq -0x60(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x116310
movq -0x110(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x118e04
cmpq $0x0, -0x78(%rbp)
jne 0x118e1d
leaq -0x60(%rbp), %rdi
leaq 0x3c5ba(%rip), %rsi     # 0x1553d0
movb $0x0, %al
callq 0xf42e0
movq -0x10(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x1b0(%rbp), %rdi
movq %rax, %rdx
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
callq 0xc00e0
movq %rax, -0x130(%rbp)
leaq 0x384f7(%rip), %rdi     # 0x15134d
callq 0x1159a0
movq %rax, -0x1a8(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x116ff0
movq -0x1a8(%rbp), %rdi
movq %rax, %rsi
movq -0x130(%rbp), %rdx
callq 0x113d00
testb $0x1, %al
jne 0x118ecf
leaq -0x78(%rbp), %rdi
callq 0x116ff0
movq %rax, %rdi
callq 0x1194d0
movq %rax, %rsi
movq -0x130(%rbp), %rax
movq 0x8(%rax), %rdx
leaq -0x60(%rbp), %rax
leaq 0x3c53b(%rip), %rdi     # 0x1553ea
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0xf3cd0
leaq -0x60(%rbp), %rdi
leaq 0x26b13(%rip), %rsi     # 0x13f9ed
movb $0x0, %al
callq 0xf3f70
movq -0x80(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x118efe
leaq -0x60(%rbp), %rdi
leaq 0x3fa76(%rip), %rsi     # 0x15896d
movb $0x0, %al
callq 0xf41c0
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x118fd7
leaq -0x60(%rbp), %rdi
callq 0x119870
movq %rax, %rdi
callq 0xff550
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jbe 0x118fcb
movq -0x138(%rbp), %rdi
movq -0x138(%rbp), %rax
movq 0x10(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x2f, %ecx
callq 0x100390
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq -0x138(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x118fc9
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x140(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x138(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1a429(%rip), %rdi     # 0x1333d0
movb $0x0, %al
callq 0xff430
movq %rax, -0x148(%rbp)
movq -0x80(%rbp), %rdi
callq 0xff600
movq -0x148(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x118fcb
movq -0x138(%rbp), %rdi
callq 0xff600
movb $0x0, %al
callq 0xcb0b0
movq %rax, %rsi
leaq -0x160(%rbp), %rdi
callq 0x1156b0
movq -0x160(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xcc860
movq -0x1c0(%rbp), %rdi
movq %rax, %rsi
callq 0xcb170
movq -0x160(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq 0x3836b(%rip), %rdi     # 0x151397
callq 0x1159a0
movq %rax, %rdi
callq 0x115960
movq -0x1b8(%rbp), %rdi
movq %rax, %rsi
callq 0xcb170
leaq -0x178(%rbp), %rdi
leaq -0x78(%rbp), %rcx
leaq -0x160(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xef320
movq -0x80(%rbp), %rdi
callq 0xff600
movq -0x190(%rbp), %rax
movq -0x178(%rbp), %rcx
movq %rcx, (%rax)
movq -0x170(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x168(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rdi
callq 0xc0720
movq -0x188(%rbp), %rax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopl (%rax,%rax)