// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_result_return_s_to_sink
BCORE_DEFINE_OBJECT_INST_P_NASC_END( xoico_che_result_return_s )

er_t xoico_che_result_return_s_to_sink( const xoico_che_result_return_s* o, x_sink* sink )
{
    // xoico_che_result.x:283:5
    
    if( !o->parent ) ERR_fa( "Parent missing." );
    
    if( xoico_che_result_block_s_is_using_blm_until_level(o->parent,0 ) )
    {
        if( xoico_che_s_returns_a_value(o->che) )
        {
            x_sink_push_sc(sink,"BLM_RETURNV(" );
            xoico_che_s_typespec_to_sink(o->che,&(o->che->signature->typespec_ret), sink );
            x_sink_push_sc(sink,"," );
            BLM_TRY(xoico_che_result_a_to_sink(o->return_expression,sink ))
            x_sink_push_sc(sink,")" );  // do not terminate BLM_RETURNV macro with a semicolon, otherwise if-else statements might not be handled correctly
        }
        else
        {
            x_sink_push_sc(sink,"BLM_RETURN()" );
            BLM_TRY(xoico_che_result_a_to_sink(o->return_expression,sink )) //probably not necessary
            x_sink_push_sc(sink,";" );
        }
    }
    else
    {
        x_sink_push_sc(sink,"return " );
        BLM_TRY(xoico_che_result_a_to_sink(o->return_expression,sink ))
        x_sink_push_sc(sink,";" );
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x18(%rdi)
jne 0x4edb3
leaq 0xede49(%rip), %rdi     # 0x13cbe2
leaq 0xe94f0(%rip), %rsi     # 0x138290
leaq 0xede0a(%rip), %rcx     # 0x13cbb1
movl $0x287b, %edx           # imm = 0x287B
xorl %eax, %eax
callq 0xc825d
movq 0x18(%r14), %rdi
xorl %esi, %esi
callq 0x4cc16
testb %al, %al
je 0x4f096
movq 0x8(%r14), %rax
movq 0x20(%rax), %rax
movq 0x28(%rax), %rcx
movabsq $0x3173c900e37ae1df, %rdx # imm = 0x3173C900E37AE1DF
cmpq %rdx, %rcx
je 0x4ede6
testq %rcx, %rcx
jne 0x4edf1
cmpq $0x0, 0x40(%rax)
je 0x4f2b0
movq (%rbx), %r15
leaq 0x15acb5(%rip), %r13    # 0x1a9ab0
movl (%r13), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x4ee56
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x4ee56
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x4ee56
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4f35d
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4ee86
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x15ac35(%rip), %rdi    # 0x1a9ab0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0xedd77(%rip), %rdx     # 0x13cc04
movq %r12, %rdi
movq %rbx, %rsi
callq 0x10908b
movq 0x8(%r14), %rdi
movq 0x20(%rdi), %rsi
addq $0x20, %rsi
movq %rbx, %rdx
callq 0x3467f
movq (%rbx), %r15
movl (%r13), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x4ef0a
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x4ef0a
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x4ef0a
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4f365
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4ef3a
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x15ab81(%rip), %rdi    # 0x1a9ab0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0xea203(%rip), %rdx     # 0x139144
movq %r12, %rdi
movq %rbx, %rsi
callq 0x10908b
movq 0x10(%r14), %r14
movq (%r14), %r15
leaq 0x153556(%rip), %rax    # 0x1a24b0
movl 0x153550(%rip), %ecx    # 0x1a24b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r15, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x4efb8
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x4efb8
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x4efb8
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4f36d
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4efe8
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x1534d3(%rip), %rdi    # 0x1a24b0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r14, %rdi
movq %rbx, %rsi
callq *0x50(%r12)
testq %rax, %rax
jne 0x4f1e9
movq (%rbx), %r14
movl (%r13), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r14, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x4f05a
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x4f05a
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x4f05a
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x4f37d
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x4f08a
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r14, %rsi
callq 0xf3f85
movq %rax, %r15
leaq 0x15aa31(%rip), %rdi    # 0x1a9ab0
movq %r14, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0x106eac(%rip), %rdx    # 0x155f3d
jmp 0x4f295
movq (%rbx), %r15
leaq 0x15aa10(%rip), %r13    # 0x1a9ab0
movl (%r13), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x4f0fb
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x4f0fb
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x4f0fb
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4f355
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4f12b
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x15a990(%rip), %rdi    # 0x1a9ab0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0xe98dd(%rip), %rdx     # 0x138a0f
movq %r12, %rdi
movq %rbx, %rsi
callq 0x10908b
movq 0x10(%r14), %r14
movq (%r14), %r15
leaq 0x153365(%rip), %rax    # 0x1a24b0
movl 0x15335f(%rip), %ecx    # 0x1a24b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r15, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x4f1a9
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x4f1a9
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x4f1a9
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4f34d
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4f1d9
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x1532e2(%rip), %rdi    # 0x1a24b0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r14, %rdi
movq %rbx, %rsi
callq *0x50(%r12)
testq %rax, %rax
je 0x4f200
movq %rax, %r14
leaq 0x159bdd(%rip), %rax    # 0x1a8dd0
movq (%rax), %rdi
callq 0xe0b30
jmp 0x4f2a3
movq (%rbx), %r14
movl (%r13), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r14, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r14, %rdx
je 0x4f25e
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r14, %rdx
je 0x4f25e
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r14, %rdx
je 0x4f25e
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r14, %rdx
jne 0x4f375
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x4f28e
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r14, %rsi
callq 0xf3f85
movq %rax, %r15
leaq 0x15a82d(%rip), %rdi    # 0x1a9ab0
movq %r14, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0xed633(%rip), %rdx     # 0x13c8c8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10908b
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%rbx), %r15
leaq 0x15a7f6(%rip), %r13    # 0x1a9ab0
movl (%r13), %eax
cltq
leaq (%rax,%rax,2), %rax
movq 0x20(%r13,%rax,8), %rcx
movq 0x18(%r13,%rax,8), %rdx
andq %r15, %rdx
shlq $0x4, %rdx
leaq (%rcx,%rdx), %rax
movq (%rcx,%rdx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x4f311
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x4f311
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x4f311
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4f385
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4f341
movabsq $0x5ea8cabb93ff3b7e, %rdi # imm = 0x5EA8CABB93FF3B7E
movq %r15, %rsi
callq 0xf3f85
movq %rax, %r12
leaq 0x15a77a(%rip), %rdi    # 0x1a9ab0
movq %r15, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0xed8c9(%rip), %rdx     # 0x13cc11
jmp 0x4f132
xorl %r12d, %r12d
jmp 0x4f1ad
xorl %r12d, %r12d
jmp 0x4f0ff
xorl %r12d, %r12d
jmp 0x4ee5a
xorl %r12d, %r12d
jmp 0x4ef0e
xorl %r12d, %r12d
jmp 0x4efbc
xorl %r15d, %r15d
jmp 0x4f262
xorl %r15d, %r15d
jmp 0x4f05e
xorl %r12d, %r12d
jmp 0x4f315