// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_translate_mutable
er_t xoico_che_s_translate_mutable( xoico_che_s* o, const xoico_host* host, const xoico_body_s* body, const xoico_signature_s* signature, x_sink* sink )
{
    // xoico_che.x:2189:1
    BLM_INIT_LEVEL(0);
    BLM_TRY(xoico_che_s_setup(o,host, signature ))
    
    x_source* source = ((x_source*)BLM_LEVEL_A_PUSH(0,x_source_point_s_clone_source(&(body->code->source_point))));
    
    xoico_che_result_arr_s* result = ((xoico_che_result_arr_s*)BLM_LEVEL_T_PUSH(0,xoico_che_result_arr_s,xoico_che_result_arr_s_create()));
    
    bl_t flag_verbatim_c = false;
    bl_t flag_try = o->for_all_functions_enable_try;
    
    if( x_source_parse_bl(source," #?'('" ) )
    {
        while( !x_source_parse_bl(source," #?')'" ) )
        {
            if( x_source_parse_bl(source," #?w'try'" ) )
            {
                BLM_RETURNV(er_t, x_source_parse_error_fa(source,"prefix (try) is deprecated." ))
                //flag_try = true;
            }
            else if( x_source_parse_bl(source," #?w'verbatim_C'" ) )
            {
                BLM_TRY(x_source_parse_error_fa(source,"prefix (verbatim_C) is deprecated." ))
                flag_verbatim_c = true;
            }
            else
            {
                BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Invalid c-engine expression." ))
            }
        }
    }
    
    sz_t indentation = 0;
    
    if( x_source_parse_bl(source," #?'{'" ) )
    {
        if( !body->go_inline ) indentation = xoico_che_s_assess_indentation(source );
    
        if( flag_verbatim_c )
        {
            BLM_TRY(xoico_che_s_trans_block_inside_verbatim_c(o,source,((xoico_che_result*)( result ))))
        }
        else
        {
            o->try_block_level += flag_try;
            BLM_TRY(xoico_che_s_trans_level0_block(o,false, source,((xoico_che_result*)( result ))))
            o->try_block_level -= flag_try;
        }
        BLM_TRY(x_source_parse_fa(source," }" ))
    }
    else // single statement body
    {
        if( !body->go_inline ) indentation = xoico_che_s_assess_indentation(source );
        o->try_block_level += flag_try;
        BLM_TRY(xoico_che_s_trans_level0_block(o,true, source,((xoico_che_result*)( result ))))
        o->try_block_level -= flag_try;
    }
    
    if( xoico_che_s_returns_a_value(o) && !o->has_completion && !o->has_verbatim_code )
    {
        if( o->signature->direct_return_arg )
        {BLM_INIT_LEVEL(2);
            xoico_che_result_arr_s_push_result_d(result,((xoico_che_result*)(xoico_che_result_return_s__(xoico_che_result_return_s_create(),o,((xoico_che_result*)( xoico_che_result_plain_s__(xoico_che_result_plain_s_create(),st_s_push_sc(((st_s*)BLM_LEVEL_T_PUSH(2,st_s,st_s_create())),xoico_che_s_nameof(o,o->signature->direct_return_arg->name ) ) ) ))) )));
        BLM_DOWN();}
        else
        {
            x_btml_to_stdout(((const x_btml*)(o->signature)));
            BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Function must return a value. Completion statement ('return' or '=') expected." ))
        }
    }
    
    xoico_che_result_block_s* result_block = ((xoico_che_result_block_s*)BLM_LEVEL_T_PUSH(0,xoico_che_result_block_s,xoico_che_result_block_s__(xoico_che_result_block_s_create(),o->block_level, xoico_che_s_stack_block_get_bottom_unit(o)->use_blm )));
    ((xoico_che_result_block_s*)(result_block))->is_root = true;
    xoico_che_result_block_s_push_result_d(result_block,((xoico_che_result*)(((xoico_che_result_arr_s*)bcore_fork(result)) )));
    
    st_s* buf = ((st_s*)BLM_LEVEL_T_PUSH(0,st_s,st_s_create()));
    BLM_TRY(xoico_che_result_block_s_to_sink(result_block,((x_sink*)(buf ))))
    
    //remove trailing whitespaces
    for(sz_t i = buf->size - 1; i >= 0; i-- )
    {
        if( buf->data[ i ] != ' ' && buf->data[ i ] != '\t' && buf->data[ i ] != '\n' ) break;
        buf->data[ i ] = 0;
        buf->size = i;
    }
    
    if( o->insert_source_reference && !body->code->single_line )
    {
        x_sink_push_fa(sink,"// " );
        x_source_point_s_source_reference_to_sink(&(body->code->source_point),true, sink );
        x_sink_push_fa(sink,"\n" );
    }
    
    if( indentation > 0 ) xoico_che_s_remove_indentation(buf, indentation );
    
    if( o->verbose )
    {
        x_sink_push_fa(x_sink_stdout(),"##############################\n" );
        x_sink_push_fa(x_sink_stdout(),"#<st_s*>\n", buf );
    }
    
    x_sink_push_sc(sink,buf->sc );
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r13
leaq 0x165010(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0xe0431
movq $0x0, 0x10(%r12)
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x43349
movq %rax, %r12
testq %rax, %rax
je 0x43e0e
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %r12, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, 0x28(%rsp)
movq %rbp, 0x20(%rsp)
movq 0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x5a4c5
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xe0900
movq %rax, %rbp
callq 0x4c277
movabsq $-0x7850996cdf80346a, %rdx # imm = 0x87AF6693207FCB96
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq %rax, 0x18(%rsp)
movq %r13, 0x8(%rsp)
movzbl 0xa(%r13), %r14d
movq (%rbp), %r15
leaq 0x165e58(%rip), %rbx    # 0x1a9cc8
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x43ec9
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x43ec9
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x43ec9
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x44675
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x43ef9
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x165dda(%rip), %rdi    # 0x1a9cc8
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r14, 0x10(%rsp)
leaq 0xf4630(%rip), %rdx     # 0x138535
movq %r13, %rdi
movq %rbp, %rsi
callq 0x10aa16
xorl %r14d, %r14d
testb %al, %al
je 0x44153
movq (%rbp), %r13
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x43f78
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x43f78
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x43f78
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x4413b
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x43fa4
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r13, %rsi
callq 0xf3f85
movq %rax, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
movq %rbp, %rsi
leaq 0xf50df(%rip), %rdx     # 0x139090
callq 0x10aa16
testb %al, %al
jne 0x44153
movq (%rbp), %r13
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x4401b
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x4401b
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x4401b
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x44143
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x44047
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r13, %rsi
callq 0xf3f85
movq %rax, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
movq %rbp, %rsi
leaq 0xf7ffa(%rip), %rdx     # 0x13c04e
callq 0x10aa16
testb %al, %al
jne 0x44653
movq (%rbp), %r13
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x440be
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x440be
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x440be
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x4414b
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x440ea
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r13, %rsi
callq 0xf3f85
movq %rax, %r15
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
movq %rbp, %rsi
leaq 0xf7f7d(%rip), %rdx     # 0x13c074
callq 0x10aa16
testb %al, %al
je 0x4465c
movq %rbp, %rdi
leaq 0xf7f77(%rip), %rsi     # 0x13c085
xorl %eax, %eax
callq 0xddb2
movq %rax, %r15
testq %rax, %rax
je 0x4412a
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %r15, %r12
movb $0x1, %r14b
testq %r15, %r15
je 0x43f1b
jmp 0x43df9
xorl %r15d, %r15d
jmp 0x43f7c
xorl %r15d, %r15d
jmp 0x4401f
xorl %r15d, %r15d
jmp 0x440c2
movq (%rbp), %r15
movl (%rbx), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%rbx,%rax,8), %rcx
movq 0x18(%rbx,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
movq 0x8(%rsp), %r13
je 0x441b5
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x441b5
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x441b5
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4467d
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
jne 0x441e5
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r15, %rsi
callq 0xf3f85
movq %rax, %rbx
leaq 0x165aee(%rip), %rdi    # 0x1a9cc8
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0xf440a(%rip), %rdx     # 0x1385f6
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x10aa16
movq 0x20(%rsp), %rcx
movb 0x20(%rcx), %cl
testb %al, %al
je 0x4420c
testb %cl, %cl
je 0x44215
xorl %r15d, %r15d
jmp 0x44220
testb %cl, %cl
je 0x4425d
xorl %r15d, %r15d
jmp 0x44268
movq %rbp, %rdi
callq 0x438b1
movq %rax, %r15
testb $0x1, %r14b
je 0x442aa
movq %r13, %rdi
movq %rbp, %rsi
movq 0x18(%rsp), %rdx
callq 0x3f4ff
movq %rax, %rbx
testq %rax, %rax
je 0x4424f
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %rbx, %r12
testq %rbx, %rbx
jne 0x43df9
jmp 0x442e7
movq %rbp, %rdi
callq 0x438b1
movq %rax, %r15
movq 0x10(%rsp), %r14
addq %r14, 0x30(%r13)
movq %r13, %rdi
movl $0x1, %esi
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
callq 0x42cab
movq %rax, %rbx
testq %rax, %rax
je 0x4429b
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %rbx, %r12
testq %rbx, %rbx
jne 0x43df9
subq %r14, 0x30(%r13)
jmp 0x44316
movq 0x10(%rsp), %r14
addq %r14, 0x30(%r13)
movq %r13, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
callq 0x42cab
movq %rax, %rbx
testq %rax, %rax
je 0x442da
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %rbx, %r12
testq %rbx, %rbx
jne 0x43df9
subq %r14, 0x30(%r13)
leaq 0x10c500(%rip), %rsi    # 0x1507ee
movq %rbp, %rdi
xorl %eax, %eax
callq 0xda10
movq %rax, %rbx
testq %rax, %rax
je 0x4430d
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %rbx, %r12
testq %rbx, %rbx
jne 0x43df9
movq %r15, 0x10(%rsp)
movabsq $-0x503db0e6e1c2e704, %rbx # imm = 0xAFC24F191E3D18FC
movq 0x8(%rsp), %r14
movq 0x20(%r14), %rdi
movq 0x28(%rdi), %rax
movabsq $0x3173c900e37ae1df, %rcx # imm = 0x3173C900E37AE1DF
cmpq %rcx, %rax
je 0x44346
testq %rax, %rax
jne 0x44351
cmpq $0x0, 0x40(%rdi)
je 0x44430
cmpb $0x0, 0xe0(%r14)
jne 0x44430
cmpb $0x0, 0xe1(%r14)
jne 0x44430
cmpq $0x0, 0x78(%rdi)
je 0x44684
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %r14
movq %rdi, (%r14)
leaq 0x38(%rsp), %rsi
callq 0xe0431
movq (%r14), %r15
movq $0x2, 0x10(%r15)
callq 0x4eb47
movq %rax, %r13
callq 0x4b989
movq %rax, %rbp
xorl %eax, %eax
callq 0x114bbb
movl $0x2, %esi
movq %r15, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0xe0676
movq %rax, %r15
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x78(%rax), %rax
movq 0x50(%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x3417e
movq %r15, %rdi
movq %rax, %rsi
callq 0x115620
leaq 0x8(%rbp), %rdi
movq %rax, %rsi
callq 0x114440
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
callq 0x446a7
movq 0x18(%rsp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movq 0x8(%rax), %rsi
movq %r13, %rdx
movq 0x8(%rsp), %r14
callq 0x5b3a7
leaq 0x30(%rsp), %rdi
callq 0xe0b11
callq 0x4c900
movq 0x28(%r14), %rcx
movq 0x98(%r14), %rdx
movq (%rdx), %rdx
movb 0x10(%rdx), %dl
movq %rcx, 0x8(%rax)
movb %dl, 0x10(%rax)
leaq 0x38(%rsp), %r15
movabsq $0x1b3ecce6627048a0, %rdx # imm = 0x1B3ECCE6627048A0
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xe0676
movq %rax, %r13
movb $0x1, 0x48(%rax)
movq 0x18(%rsp), %rdi
callq 0xc8348
movq %r13, %rdi
movq %rax, %rsi
callq 0x42670
xorl %eax, %eax
callq 0x114bbb
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %rax, %rcx
callq 0xe0676
movq %rax, %rbx
addq $0x18, %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x349b3
movq %rax, %r15
testq %rax, %rax
je 0x444c3
leaq 0x38(%rsp), %rdi
callq 0xe0b30
movq %r15, %r12
testq %r15, %r15
jne 0x43df9
movq 0x10(%rbx), %rax
movq %rax, %rcx
decq %rcx
js 0x44508
movabsq $0x100000600, %rcx      # imm = 0x100000600
movq 0x8(%rbx), %rdx
movzbl -0x1(%rdx,%rax), %esi
cmpq $0x20, %rsi
ja 0x44508
btq %rsi, %rcx
jae 0x44508
movb $0x0, -0x1(%rdx,%rax)
decq %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
jg 0x444e2
movq 0x8(%rsp), %r14
cmpb $0x1, 0x9(%r14)
movq 0x28(%rsp), %r12
movq 0x20(%rsp), %r15
jne 0x4455f
movq 0x18(%r15), %rax
cmpb $0x0, 0x8(%rax)
jne 0x4455f
leaq 0xf7be5(%rip), %rsi     # 0x13c114
movq %r12, %rdi
xorl %eax, %eax
callq 0xee2a
movq 0x18(%r15), %rdi
addq $0x18, %rdi
movl $0x1, %esi
movq %r12, %rdx
callq 0x5abba
leaq 0x10f199(%rip), %rsi    # 0x1536ee
movq %r12, %rdi
xorl %eax, %eax
callq 0xee2a
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
jle 0x44571
movq %rbx, %rdi
callq 0x43cf1
cmpb $0x1, 0x8(%r14)
jne 0x445a4
leaq 0x164869(%rip), %r14    # 0x1a8de8
movq (%r14), %rdi
leaq 0xf7b8f(%rip), %rsi     # 0x13c118
xorl %eax, %eax
callq 0xee2a
movq (%r14), %rdi
leaq 0x11431c(%rip), %rsi    # 0x1588b6
movq %rbx, %rdx
xorl %eax, %eax
callq 0xee2a
movq 0x8(%rbx), %rbx
movq (%r12), %r14
leaq 0x1654fd(%rip), %rax    # 0x1a9ab0
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r14, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x4460d
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x4460d
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x4460d
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x4469f
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x4463d
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r14, %rsi
callq 0xf3f85
movq %rax, %r15
leaq 0x16547e(%rip), %rdi    # 0x1a9ab0
movq %r14, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10908b
xorl %r12d, %r12d
jmp 0x43def
leaq 0xf79fe(%rip), %rsi     # 0x13c058
jmp 0x44663
leaq 0xf7a45(%rip), %rsi     # 0x13c0a8
movq %rbp, %rdi
xorl %eax, %eax
callq 0xddb2
movq %rax, %r12
jmp 0x43def
xorl %r13d, %r13d
jmp 0x43ecd
xorl %ebx, %ebx
jmp 0x441b9
movq (%rdi), %rsi
leaq 0x16475a(%rip), %rax    # 0x1a8de8
movq (%rax), %rdx
callq 0x6d96e
leaq 0xf7a28(%rip), %rsi     # 0x13c0c5
jmp 0x44663
xorl %r15d, %r15d
jmp 0x44611