// File: /workspace/github_c_makefile_star2_O3/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, 0x28(%rsp)
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq 0x15bdbc(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0xd6675
movq $0x0, 0x10(%r12)
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3f66b
testq %rax, %rax
je 0x40062
movq %rax, %rbp
leaq 0x38(%rsp), %rdi
callq 0xd6d2c
movq %rbp, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, 0x20(%rsp)
movq 0x18(%r14), %rdi
addq $0x18, %rdi
callq 0x54d1f
leaq 0x38(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xd6b17
movq %rax, %rbx
callq 0x46f7e
movabsq $-0x7850996cdf80346a, %rdx # imm = 0x87AF6693207FCB96
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, 0x10(%rsp)
movzbl 0xa(%r13), %eax
movq %rax, 0x18(%rsp)
movq (%rbx), %r14
leaq 0x15cc0a(%rip), %r12    # 0x19ccc8
movl (%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r12,%rax,8), %rcx
movq 0x18(%r12,%rax,8), %rdx
andq %r14, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x40115
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x40115
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x40115
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x4011e
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x40145
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x15cb8e(%rip), %rdi    # 0x19ccc8
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r13, 0x8(%rsp)
leaq 0xed3e4(%rip), %rdx     # 0x12d535
movq %r15, %rdi
movq %rbx, %rsi
callq 0xffe2b
testb %al, %al
je 0x4036c
leaq 0xedf25(%rip), %r13     # 0x12e090
xorl %r14d, %r14d
movq (%rbx), %rbp
movl (%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r12,%rax,8), %rcx
movq 0x18(%r12,%rax,8), %rdx
andq %rbp, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x401c8
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x401c8
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x401c8
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x401d1
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x401f4
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %rbp, %rsi
callq 0xe9bc5
movq %rax, %r15
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0xffe2b
testb %al, %al
jne 0x4036f
movq (%rbx), %rbp
movl (%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r12,%rax,8), %rcx
movq 0x18(%r12,%rax,8), %rdx
andq %rbp, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x40264
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x40264
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x40264
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x4026d
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x40290
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %rbp, %rsi
callq 0xe9bc5
movq %rax, %r15
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r15, %rdi
movq %rbx, %rsi
leaq 0xf0db1(%rip), %rdx     # 0x13104e
callq 0xffe2b
testb %al, %al
jne 0x407e9
movq (%rbx), %rbp
movl (%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r12,%rax,8), %rcx
movq 0x18(%r12,%rax,8), %rdx
andq %rbp, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x40304
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x40304
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x40304
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x4030d
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x40330
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %rbp, %rsi
callq 0xe9bc5
movq %rax, %r15
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r15, %rdi
movq %rbx, %rsi
leaq 0xf0d37(%rip), %rdx     # 0x131074
callq 0xffe2b
testb %al, %al
je 0x407f2
movq %rbx, %rdi
leaq 0xf0d31(%rip), %rsi     # 0x131085
xorl %eax, %eax
callq 0xde10
movb $0x1, %r14b
testq %rax, %rax
je 0x4016e
jmp 0x40040
xorl %r14d, %r14d
movq (%rbx), %r13
movl (%r12), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r12,%rax,8), %rcx
movq 0x18(%r12,%rax,8), %rdx
andq %r13, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r13, %rdx
je 0x403c9
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r13, %rdx
je 0x403c9
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r13, %rdx
je 0x403c9
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r13, %rdx
jne 0x403d2
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x403f9
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %r13, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x15c8da(%rip), %rdi    # 0x19ccc8
movq %r13, %rsi
movq %rax, %rdx
callq 0x115fac
leaq 0xed1f6(%rip), %rdx     # 0x12d5f6
movq %r15, %rdi
movq %rbx, %rsi
callq 0xffe2b
movq 0x20(%rsp), %rcx
movb 0x20(%rcx), %cl
testb %al, %al
je 0x4042a
testb %cl, %cl
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r13
je 0x4043d
xorl %r12d, %r12d
jmp 0x40448
testb %cl, %cl
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r13
je 0x4046c
xorl %r12d, %r12d
jmp 0x40477
movq %rbx, %rdi
callq 0x3fb2a
movq %rax, %r12
testb $0x1, %r14b
je 0x404a2
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3be1b
testq %rax, %rax
jne 0x40040
jmp 0x404c8
movq %rbx, %rdi
callq 0x3fb2a
movq %rax, %r12
movq 0x8(%rsp), %r14
addq %r13, 0x30(%r14)
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x3f07a
testq %rax, %rax
jne 0x40040
subq %r13, 0x30(%r14)
jmp 0x404e2
movq 0x8(%rsp), %r14
addq %r13, 0x30(%r14)
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x3f07a
testq %rax, %rax
jne 0x40040
subq %r13, 0x30(%r14)
leaq 0x105345(%rip), %rsi    # 0x145814
movq %rbx, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x40040
movabsq $-0x503db0e6e1c2e704, %rbp # imm = 0xAFC24F191E3D18FC
movq 0x20(%r14), %rdi
movq 0x28(%rdi), %rax
movabsq $0x3173c900e37ae1df, %rcx # imm = 0x3173C900E37AE1DF
cmpq %rcx, %rax
je 0x40508
testq %rax, %rax
jne 0x40513
cmpq $0x0, 0x40(%rdi)
je 0x405e6
cmpb $0x0, 0xe0(%r14)
jne 0x405e6
cmpb $0x0, 0xe1(%r14)
jne 0x405e6
cmpq $0x0, 0x78(%rdi)
je 0x40808
leaq 0x68(%rsp), %r15
leaq 0x30(%rsp), %rax
movq %r15, (%rax)
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0xd6675
movq $0x2, 0x10(%r15)
callq 0x497f8
movq %rax, %r13
callq 0x466ca
movq %rax, %rbx
xorl %eax, %eax
callq 0x109c82
movl $0x2, %esi
movq %r15, %rdi
movq %rbp, %rdx
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r15
movq 0x20(%r14), %rax
movq 0x78(%rax), %rax
movq 0x50(%rax), %rsi
movq %r14, %rdi
callq 0x31f9d
movq %r15, %rdi
movq 0x10(%rsp), %r15
movq %rax, %rsi
callq 0x10a6fa
leaq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x1094fa
movq %r14, 0x8(%r13)
leaq 0x10(%r13), %rdi
movq %rbx, %rsi
callq 0x48bb5
movq %r15, %rdi
addq $0x8, %rdi
movq 0x8(%r15), %rsi
movq %r13, %rdx
callq 0x55b79
leaq 0x30(%rsp), %rdi
callq 0xd6d0d
callq 0x475b2
movq 0x28(%r14), %rcx
movq 0x98(%r14), %rdx
movq (%rdx), %rdx
movb 0x10(%rdx), %dl
movq %rcx, 0x8(%rax)
movb %dl, 0x10(%rax)
movq %r15, %rbx
leaq 0x38(%rsp), %r15
movabsq $0x1b3ecce6627048a0, %rdx # imm = 0x1B3ECCE6627048A0
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r13
movb $0x1, 0x48(%rax)
movq %rbx, %rdi
callq 0xbe7e4
movq %r13, %rdi
movq %rax, %rsi
callq 0x3eafe
xorl %eax, %eax
callq 0x109c82
movq %r15, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %rax, %rcx
callq 0xd68a8
movq %rax, %rbx
addq $0x18, %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x32715
testq %rax, %rax
jne 0x40040
movq 0x10(%rbx), %rax
movq %rax, %rcx
decq %rcx
js 0x406aa
movabsq $0x100000600, %rcx      # imm = 0x100000600
movq 0x8(%rbx), %rdx
movzbl -0x1(%rdx,%rax), %esi
cmpq $0x20, %rsi
ja 0x406aa
btq %rsi, %rcx
jae 0x406aa
movb $0x0, -0x1(%rdx,%rax)
decq %rax
movq %rax, 0x10(%rbx)
testq %rax, %rax
jg 0x40684
cmpb $0x1, 0x9(%r14)
movq 0x28(%rsp), %r13
movq 0x20(%rsp), %r15
jne 0x406fc
movq 0x18(%r15), %rax
cmpb $0x0, 0x8(%rax)
jne 0x406fc
leaq 0xf0a48(%rip), %rsi     # 0x131114
movq %r13, %rdi
xorl %eax, %eax
callq 0xed3f
movq 0x18(%r15), %rdi
addq $0x18, %rdi
movl $0x1, %esi
movq %r13, %rdx
callq 0x553d5
leaq 0x108022(%rip), %rsi    # 0x148714
movq %r13, %rdi
xorl %eax, %eax
callq 0xed3f
testq %r12, %r12
jle 0x4070c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3ff41
cmpb $0x1, 0x8(%r14)
jne 0x4073f
leaq 0x15b6ce(%rip), %r14    # 0x19bde8
movq (%r14), %rdi
leaq 0xf09f4(%rip), %rsi     # 0x131118
xorl %eax, %eax
callq 0xed3f
movq (%r14), %rdi
leaq 0x10d1d9(%rip), %rsi    # 0x14d90e
movq %rbx, %rdx
xorl %eax, %eax
callq 0xed3f
movq 0x8(%rbx), %rbx
movq (%r13), %r14
leaq 0x15c362(%rip), %rax    # 0x19cab0
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 0x407a4
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x407a4
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x407a4
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x407ad
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x407d4
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r14, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x15c2e7(%rip), %rdi    # 0x19cab0
movq %r14, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0xfe4f3
xorl %ebp, %ebp
jmp 0x40043
leaq 0xf0868(%rip), %rsi     # 0x131058
jmp 0x407f9
leaq 0xf08af(%rip), %rsi     # 0x1310a8
movq %rbx, %rdi
xorl %eax, %eax
callq 0xde10
jmp 0x40040
movq (%rdi), %rsi
leaq 0x15b5d6(%rip), %rax    # 0x19bde8
movq (%rax), %rdx
callq 0x67506
leaq 0xf08a4(%rip), %rsi     # 0x1310c5
jmp 0x407f9