// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: bcore_shell_loop
er_t bcore_shell_loop( bcore_shell* o, const bcore_main_frame_s* frame, bcore_shell_control_s* control )
{
    // bcore_shell.h:422:1
    BLM_INIT_LEVEL(0);
    if( !control        ) control = ((bcore_shell_control_s*)BLM_LEVEL_T_PUSH(0,bcore_shell_control_s,bcore_shell_control_s_create()));
    if( !control->source ) x_source_a_attach( &(control->source ), (x_source*)( ((bcore_source*)bcore_fork(frame->source))));
    if( !control->sink   ) x_sink_a_attach( &(control->sink   ), (x_sink*)( ((bcore_sink*)bcore_fork(frame->sink))));
    
    while( !x_source_eos(control->source) && !bcore_shell_control_s_exit_loop(control) && !bcore_shell_a_loop_callback(o) )
    {BLM_INIT_LEVEL(1);
        if( control->prompt.size > 0 )
        {
            x_sink_flush(x_sink_push_fa(control->sink,"\n#<sc_t>> ", control->prompt.sc ));
        }
        else
        {
            x_sink_flush(x_sink_push_fa(control->sink,"\n#<sc_t>#<sc_t>(#<sc_t>)> ", control->path.sc, control->path.size ? " " : "", bnameof( o->_ ) ));
        }
        bcore_shell_control_s_reset(control);
    
        st_s expression;BLM_T_INIT_SPUSH(st_s, &expression);;
        BLM_TRY(x_source_parse_fa(control->source," #until'\n'#skip'\n'", (&(expression)) ))
    
        if( expression.size > 0 )
        {BLM_INIT_LEVEL(2);
            if( x_hmap_tp_exists(((const x_hmap_tp*)(&(control->hmap_alias))),btypeof( expression.sc ) ) )
            {
                st_s_copy(&(expression),((const st_s*)(x_hmap_tp_c_get(((const x_hmap_tp*)(&(control->hmap_alias))),btypeof( expression.sc ) ))) );
            }
    
            if( !bcore_shell_run_expression(o,frame, control, ((x_source*)BLM_LEVEL_A_PUSH(2,x_source_create_from_st(&(expression )))) ) )
            {
                x_sink_push_fa(control->sink,"Syntax error in expression '#<sc_t>'\n", expression.sc );
                bcore_shell_help_to_sink(o,control,((bcore_sink*)( control->sink )));
            }
        BLM_DOWN();}
    BLM_DOWN();}
    
    control->exit_loop = false;
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
leaq 0x13ea4e(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0xe0431
movq $0x0, 0x10(%rbx)
testq %r15, %r15
jne 0x6a3c0
callq 0x6b2f1
leaq 0x48(%rsp), %rdi
movabsq $0x65568789b6f2bdaf, %rdx # imm = 0x65568789B6F2BDAF
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq %rax, %r15
cmpq $0x0, 0x18(%r15)
jne 0x6a4ae
movq 0x8(%rsp), %rax
movq 0xd0(%rax), %rdi
callq 0xc8348
movq %rax, %rbx
testq %rax, %rax
je 0x6a3f6
movq (%rbx), %rsi
movabsq $0x2e28ff78616384dd, %rdi # imm = 0x2E28FF78616384DD
callq 0x1222bd
movq 0x18(%r15), %r12
testq %r12, %r12
je 0x6a4aa
movq %rbp, %r14
movq (%r12), %r13
leaq 0x13f057(%rip), %rax    # 0x1a9468
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r13, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x6a46b
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x6a46b
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x6a46b
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x6aa76
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0x6a49b
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %r13, %rsi
callq 0xf3f85
movq %rax, %rbp
leaq 0x13efd8(%rip), %rdi    # 0x1a9468
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
movq %rbp, %rdi
movq %r12, %rsi
callq *0xb8(%rbp)
movq %r14, %rbp
movq %rbx, 0x18(%r15)
cmpq $0x0, 0x10(%r15)
jne 0x6a59c
movq 0x8(%rsp), %rax
movq 0xd8(%rax), %rdi
callq 0xc8348
movq %rax, %rbx
testq %rax, %rax
je 0x6a4e4
movq (%rbx), %rsi
movabsq $0x7652a8509073840b, %rdi # imm = 0x7652A8509073840B
callq 0x1222bd
movq 0x10(%r15), %r12
testq %r12, %r12
je 0x6a598
movq %rbp, %r14
movq (%r12), %r13
leaq 0x13ef69(%rip), %rax    # 0x1a9468
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r13, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x6a559
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x6a559
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x6a559
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x6aa7d
movq (%rax,%rcx), %rbp
testq %rbp, %rbp
jne 0x6a589
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %r13, %rsi
callq 0xf3f85
movq %rax, %rbp
leaq 0x13eeea(%rip), %rdi    # 0x1a9468
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
movq %rbp, %rdi
movq %r12, %rsi
callq *0xb8(%rbp)
movq %r14, %rbp
movq %rbx, 0x10(%r15)
leaq 0x50(%r15), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%r15), %r12
movq (%r12), %r13
leaq 0x13f714(%rip), %rdx    # 0x1a9cc8
movl (%rdx), %eax
cltq
leaq (%rax,%rax,2), %rax
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 0x6a60d
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x6a60d
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x6a60d
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x6aa34
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
jne 0x6a63d
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r13, %rsi
callq 0xf3f85
movq %rax, %rbx
leaq 0x13f696(%rip), %rdi    # 0x1a9cc8
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
cmpq $0x0, 0x40(%rbx)
jne 0x6a653
movq %rbx, %rdi
leaq 0xda8c3(%rip), %rsi     # 0x144f11
callq 0xf592c
movq %r12, %rdi
callq *0x40(%rbx)
testb %al, %al
jne 0x6aa49
cmpb $0x0, 0x88(%r15)
jne 0x6aa49
movq (%rbp), %r12
movl 0x13bb27(%rip), %eax    # 0x1a61a0
cltq
leaq (%rax,%rax,2), %rax
leaq 0x13bb1a(%rip), %rdx    # 0x1a61a0
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %r12, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r12, %rdx
je 0x6a6d7
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r12, %rdx
je 0x6a6d7
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r12, %rdx
je 0x6a6d7
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r12, %rdx
jne 0x6aa3b
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
jne 0x6a707
movabsq $-0xe3c3103182b3769, %rdi # imm = 0xF1C3CEFCE7D4C897
movq %r12, %rsi
callq 0xf3f85
movq %rax, %rbx
leaq 0x13baa4(%rip), %rdi    # 0x1a61a0
movq %r12, %rsi
movq %rax, %rdx
callq 0x12128c
movq %rbp, %rdi
callq *0x10(%rbx)
testb %al, %al
jne 0x6aa49
movq %rbp, %r14
leaq 0xa8(%rsp), %rdi
movq %rdi, (%rsp)
leaq 0x48(%rsp), %rsi
callq 0xe0431
movq (%rsp), %r12
movq $0x1, 0x10(%r12)
cmpq $0x0, 0xc0(%r15)
movq 0x10(%r15), %r13
je 0x6a763
movq 0xb8(%r15), %rdx
movq %r13, %rdi
leaq 0xd803f(%rip), %rsi     # 0x142799
xorl %eax, %eax
callq 0x5afab
jmp 0x6a7a6
movq 0x98(%r15), %rbx
cmpq $0x0, 0xa0(%r15)
leaq 0xe4234(%rip), %rbp     # 0x14e9ad
leaq 0xe8f6f(%rip), %rax     # 0x1536ef
cmoveq %rax, %rbp
movq (%r14), %rdi
callq 0xe0cbc
movq %r13, %rdi
leaq 0xd800e(%rip), %rsi     # 0x1427a4
movq %rbx, %rdx
movq %rbp, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x5afab
movq (%r13), %rbp
leaq 0x13f2ff(%rip), %rdx    # 0x1a9ab0
movl (%rdx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rdx,%rax,8), %rcx
movq 0x18(%rdx,%rax,8), %rdx
andq %rbp, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x6a80a
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x6a80a
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x6a80a
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x6aa42
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
jne 0x6a83a
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %rbp, %rsi
callq 0xf3f85
movq %rax, %rbx
leaq 0x13f281(%rip), %rdi    # 0x1a9ab0
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0x20(%rbx), %rbp
cmpq $0x0, 0x20(%rbx)
jne 0x6a854
movq %rbx, %rdi
leaq 0xdaade(%rip), %rsi     # 0x14532d
callq 0xf592c
movq %r13, %rdi
callq *(%rbp)
movb $0x0, 0x88(%r15)
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x113f7c
movq %r12, %rdi
movabsq $-0x503db0e6e1c2e704, %rsi # imm = 0xAFC24F191E3D18FC
movq %rbx, %rdx
callq 0xe06ab
movq 0x18(%r15), %rdi
leaq 0xd7f30(%rip), %rsi     # 0x1427bf
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5cde9
movq %rax, %rbx
testq %rax, %rax
je 0x6a8af
movq (%rsp), %rdi
callq 0xe0b30
movq %rbx, 0x20(%rsp)
testq %rbx, %rbx
jne 0x6aa5f
movq %r14, %rbp
cmpq $0x0, 0x38(%rsp)
movabsq $0x100000001b3, %r14    # imm = 0x100000001B3
je 0x6aa27
movq (%rsp), %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xe0431
movq 0x18(%rsp), %r12
movq $0x2, 0x10(%r12)
movq 0x30(%rsp), %rax
movabsq $-0x509c42b379fe4821, %rbx # imm = 0xAF63BD4C8601B7DF
testq %rax, %rax
je 0x6a939
movb (%rax), %cl
movabsq $-0x340d631b7bdddcdb, %rbx # imm = 0xCBF29CE484222325
testb %cl, %cl
je 0x6a939
incq %rax
movabsq $-0x340d631b7bdddcdb, %rdx # imm = 0xCBF29CE484222325
movzbl %cl, %ebx
xorq %rdx, %rbx
imulq %r14, %rbx
movb (%rax), %cl
incq %rax
movq %rbx, %rdx
testb %cl, %cl
jne 0x6a923
movq 0x10(%rsp), %rdi
callq 0xa8396
leaq 0x8(%rax), %rdi
movq %rbx, %rsi
callq 0xd6885
testb %al, %al
je 0x6a9c6
movq 0x30(%rsp), %rax
movabsq $-0x509c42b379fe4821, %rbx # imm = 0xAF63BD4C8601B7DF
testq %rax, %rax
je 0x6a99a
movb (%rax), %cl
movabsq $-0x340d631b7bdddcdb, %rbx # imm = 0xCBF29CE484222325
testb %cl, %cl
je 0x6a99a
incq %rax
movabsq $-0x340d631b7bdddcdb, %rdx # imm = 0xCBF29CE484222325
movzbl %cl, %ebx
xorq %rdx, %rbx
imulq %r14, %rbx
movb (%rax), %cl
incq %rax
movq %rbx, %rdx
testb %cl, %cl
jne 0x6a984
movq 0x10(%rsp), %rdi
callq 0xa8396
leaq 0x8(%rax), %rdi
movq %rbx, %rsi
callq 0xd63b5
testq %rax, %rax
je 0x6a9ba
movq (%rax), %rsi
jmp 0x6a9bc
xorl %esi, %esi
leaq 0x28(%rsp), %rdi
callq 0x114440
leaq 0x28(%rsp), %rdi
callq 0xee7cd
movl $0x2, %esi
movq %r12, %rdi
movq %rax, %rdx
callq 0xe0900
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0x68e98
testb %al, %al
jne 0x6aa1d
movq 0x10(%r15), %rdi
movq 0x30(%rsp), %rdx
leaq 0xd7dcb(%rip), %rsi     # 0x1427d2
xorl %eax, %eax
callq 0x5afab
movq 0x10(%r15), %rdx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x68372
leaq 0x18(%rsp), %rdi
callq 0xe0b11
movq %rsp, %rdi
callq 0xe0b11
jmp 0x6a5a5
xorl %ebx, %ebx
jmp 0x6a611
xorl %ebx, %ebx
jmp 0x6a6db
xorl %ebx, %ebx
jmp 0x6a80e
movb $0x0, 0x88(%r15)
leaq 0x48(%rsp), %rdi
callq 0xe0b30
xorl %eax, %eax
jmp 0x6aa64
movq 0x20(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x6a46f
xorl %ebp, %ebp
jmp 0x6a55d