// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
leaq 0x184ffa(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xbfe80
movq -0x70(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2cc30
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x2d3a0
movq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
movq -0x38(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
callq 0x43140
movq -0x188(%rbp), %rdi
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xc0500
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x180(%rbp)
callq 0x35ee0
movq -0x180(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x7850996cdf80346a, %rdx # imm = 0x87AF6693207FCB96
callq 0xc01a0
movq %rax, -0x90(%rbp)
movb $0x0, -0x91(%rbp)
movq -0x10(%rbp), %rax
movb 0xa(%rax), %al
andb $0x1, %al
movb %al, -0x92(%rbp)
movq -0x88(%rbp), %rdi
leaq 0x10645f(%rip), %rsi    # 0x13388d
callq 0x6700
testb $0x1, %al
jne 0x2d43c
jmp 0x2d557
jmp 0x2d43e
movq -0x88(%rbp), %rdi
leaq 0x106f99(%rip), %rsi    # 0x1343e5
callq 0x6700
xorb $-0x1, %al
testb $0x1, %al
jne 0x2d45c
jmp 0x2d555
movq -0x88(%rbp), %rdi
leaq 0x109eef(%rip), %rsi    # 0x137359
callq 0x6700
testb $0x1, %al
jne 0x2d475
jmp 0x2d4aa
movq -0x88(%rbp), %rdi
leaq 0x109ee0(%rip), %rsi    # 0x137363
movb $0x0, %al
callq 0x4c80
movq %rax, -0xa0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
movq -0x88(%rbp), %rdi
leaq 0x109ec7(%rip), %rsi    # 0x13737f
callq 0x6700
testb $0x1, %al
jne 0x2d4c3
jmp 0x2d519
movq -0x88(%rbp), %rdi
leaq 0x109ebf(%rip), %rsi    # 0x137390
movb $0x0, %al
callq 0x4c80
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x2d510
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0xb0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
movb $0x1, -0x91(%rbp)
jmp 0x2d54e
movq -0x88(%rbp), %rdi
leaq 0x109e8c(%rip), %rsi    # 0x1373b3
movb $0x0, %al
callq 0x4c80
movq %rax, -0xb8(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0xb8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
jmp 0x2d550
jmp 0x2d43e
jmp 0x2d557
movq $0x0, -0xc0(%rbp)
movq -0x88(%rbp), %rdi
leaq 0x1063de(%rip), %rsi    # 0x13394e
callq 0x6700
testb $0x1, %al
jne 0x2d57e
jmp 0x2d6d0
movq -0x20(%rbp), %rax
testb $0x1, 0x20(%rax)
jne 0x2d59b
movq -0x88(%rbp), %rdi
callq 0x2d160
movq %rax, -0xc0(%rbp)
testb $0x1, -0x91(%rbp)
je 0x2d5f8
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0x29750
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
je 0x2d5f3
movq -0xc8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0xd0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
jmp 0x2d67e
movb -0x92(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq -0x90(%rbp), %rcx
xorl %esi, %esi
callq 0x2c8e0
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
je 0x2d662
movq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0xe0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
movb -0x92(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x30(%rax)
movq -0x88(%rbp), %rdi
leaq 0x122480(%rip), %rsi    # 0x14fb0c
movb $0x0, %al
callq 0x4a20
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
je 0x2d6cb
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0xf0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
jmp 0x2d776
movq -0x20(%rbp), %rax
testb $0x1, 0x20(%rax)
jne 0x2d6ed
movq -0x88(%rbp), %rdi
callq 0x2d160
movq %rax, -0xc0(%rbp)
movb -0x92(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq -0x90(%rbp), %rcx
movl $0x1, %esi
callq 0x2c8e0
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
je 0x2d75a
movq -0xf8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0x100(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
movb -0x92(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
callq 0x2c530
testb $0x1, %al
jne 0x2d788
jmp 0x2d91f
movq -0x10(%rbp), %rax
testb $0x1, 0xe0(%rax)
jne 0x2d91f
movq -0x10(%rbp), %rax
testb $0x1, 0xe1(%rax)
jne 0x2d91f
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
cmpq $0x0, 0x78(%rax)
je 0x2d8db
movq -0x70(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x138(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0xbfe80
movq -0x140(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq $0x2, 0x10(%rax)
movq -0x90(%rbp), %rax
movq %rax, -0x190(%rbp)
callq 0x36e30
movq %rax, -0x1a0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x198(%rbp)
callq 0x35c80
movq %rax, -0x1a8(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x1b8(%rbp), %rdi
movq %rax, %rcx
movl $0x2, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x1b0(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x78(%rax), %rax
movq 0x50(%rax), %rsi
callq 0x22840
movq -0x1b0(%rbp), %rdi
movq %rax, %rsi
callq 0x100040
movq -0x1a8(%rbp), %rdi
movq %rax, %rsi
callq 0x2dc30
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
movq %rax, %rdx
callq 0x2dbf0
movq -0x190(%rbp), %rdi
movq %rax, %rsi
callq 0x2ada0
leaq -0x140(%rbp), %rdi
callq 0xc06e0
jmp 0x2d91d
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x2dc60
movq -0x88(%rbp), %rdi
leaq 0x109ada(%rip), %rsi    # 0x1373d0
movb $0x0, %al
callq 0x4c80
movq %rax, -0x148(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0x148(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
jmp 0x2d91f
movq -0x38(%rbp), %rax
movq %rax, -0x1d0(%rbp)
callq 0x361f0
movq %rax, -0x1e0(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x1d8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22b10
movq -0x1e0(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
movb 0x10(%rax), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x2c490
movq -0x1d0(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $0x1b3ecce6627048a0, %rdx # imm = 0x1B3ECCE6627048A0
callq 0xc01a0
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movb $0x1, 0x48(%rax)
movq -0x150(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movq -0x90(%rbp), %rdi
callq 0x9d3d0
movq -0x1c8(%rbp), %rdi
movq %rax, %rsi
callq 0x2c4d0
movq -0x38(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movb $0x0, %al
callq 0xff2e0
movq -0x1c0(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x503db0e6e1c2e704, %rdx # imm = 0xAFC24F191E3D18FC
callq 0xc01a0
movq %rax, -0x158(%rbp)
movq -0x150(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x2dc90
movq %rax, -0x160(%rbp)
cmpq $0x0, -0x160(%rbp)
je 0x2da42
movq -0x160(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0x168(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2dbdb
movq -0x158(%rbp), %rax
movq 0x10(%rax), %rax
subq $0x1, %rax
movq %rax, -0x170(%rbp)
cmpq $0x0, -0x170(%rbp)
jl 0x2daf8
movq -0x158(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x170(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
je 0x2dab9
movq -0x158(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x170(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
je 0x2dab9
movq -0x158(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x170(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x2dab9
jmp 0x2daf8
movq -0x158(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x170(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x170(%rbp), %rcx
movq -0x158(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x170(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x170(%rbp)
jmp 0x2da58
movq -0x10(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x2db4e
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
testb $0x1, 0x8(%rax)
jne 0x2db4e
movq -0x30(%rbp), %rdi
leaq 0x109904(%rip), %rsi    # 0x13741f
movb $0x0, %al
callq 0x56e0
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x30(%rbp), %rdx
movl $0x1, %esi
callq 0x43350
movq -0x30(%rbp), %rdi
leaq 0x124eda(%rip), %rsi    # 0x152a21
movb $0x0, %al
callq 0x56e0
cmpq $0x0, -0xc0(%rbp)
jle 0x2db6b
movq -0x158(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0x2d1f0
movq -0x10(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x2dba8
callq 0x2b5c0
movq %rax, %rdi
leaq 0x10989f(%rip), %rsi    # 0x137423
movb $0x0, %al
callq 0x56e0
callq 0x2b5c0
movq %rax, %rdi
movq -0x158(%rbp), %rdx
leaq 0x12a4f2(%rip), %rsi    # 0x158093
movb $0x0, %al
callq 0x56e0
movq -0x30(%rbp), %rdi
movq -0x158(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xc460
movq $0x0, -0x178(%rbp)
movq -0x70(%rbp), %rdi
callq 0xc0720
movq -0x178(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopl (%rax,%rax)