// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_trans_builtin_try
er_t xoico_che_s_trans_builtin_try( xoico_che_s* o, x_source* source, bl_t source_without_brackets, const xoico_che_result* result_expr, const xoico_typespec_s* typespec_expr, xoico_che_result* result_out, xoico_typespec_s* typespec_out )
{
    // xoico_che_builtin.x:429:1
    BLM_INIT_LEVEL(0);
    if( typespec_out ) xoico_typespec_s_reset(typespec_out);
    
    if( result_expr ) // member call
    {
        if( source_without_brackets )
        {
            BLM_TRY(x_source_parse_fa(source," " ))
        }
        else
        {
            BLM_TRY(x_source_parse_fa(source," ( " ))
        }
        xoico_che_result_a_clear(result_out);
    }
    else // direct call
    {
        BLM_TRY(x_source_parse_fa(source,"try " ))
    
        if( x_source_parse_bl(source,"#=?'{'" ) ) // try block
        {
            o->try_block_level++;
            BLM_TRY(xoico_che_s_trans_block(o,source, result_out, false ))
            o->try_block_level--;
            BLM_RETURNV(er_t, 0)
        }
    
        BLM_TRY(x_source_parse_fa(source,"( " ))
        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()));
        xoico_typespec_s* typespec = ((xoico_typespec_s*)BLM_LEVEL_T_PUSH(0,xoico_typespec_s,xoico_typespec_s_create()));
        BLM_TRY(xoico_che_s_trans_expression(o,source,((xoico_che_result*)( result)), typespec ))
        typespec_expr = typespec;
        result_expr =((const xoico_che_result*)( result));
    }
    
    const xoico_typespec_s* typespec_try = typespec_expr;
    
    if( source_without_brackets )
    {
        BLM_TRY(x_source_parse_fa(source," ;" ))
    }
    else
    {
        BLM_TRY(x_source_parse_fa(source," ) ;" ))
    }
    
    
    if( typespec_try->type != 0 )
    {
        if( typespec_try->type != ((tp_t)(TYPEOF_er_t)) ) BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Operator 'try': Expression must yield er_t." ))
        if( typespec_try->indirection != 0    ) BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Operator 'try': Expression's indirection != 0." ))
    }
    else
    {
        // return source.parse_error_fa( "Operator 'try': Expression not tractable." );
    }
    
    if( xoico_che_s_returns_er_t(o) )
    {
        BLM_TRY(xoico_che_result_a_push_sc(result_out,"BLM_TRY(" ))
    }
    else
    {
        BLM_TRY(xoico_che_result_a_push_sc(result_out,"BLM_TRY_EXIT(" ))
    }
    xoico_che_result_a_push_result_c(result_out,result_expr );
    BLM_TRY(xoico_che_result_a_push_sc(result_out,")" ))
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r13
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
movq 0x80(%rsp), %rbx
leaq 0xf2ec3(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x717f5
andq $0x0, 0x10(%r15)
testq %rbx, %rbx
je 0x24f2f
movq %rbx, %rdi
callq 0xe120
testq %r12, %r12
je 0x24f42
testb %bpl, %bpl
je 0x24fa2
leaq 0x9c83d(%rip), %rsi     # 0xc177d
jmp 0x24fa9
leaq 0x89977(%rip), %rsi     # 0xae8c0
movq %r14, %rdi
xorl %eax, %eax
callq 0xd600
testq %rax, %rax
jne 0x250f7
leaq 0x85669(%rip), %rsi     # 0xaa5cc
movq %r14, %rdi
callq 0xe5ff
testb %al, %al
je 0x2501a
movq 0x10(%rsp), %r15
incq 0x30(%r15)
movq %r15, %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x210fb
testq %rax, %rax
jne 0x250f7
decq 0x30(%r15)
xorl %ebx, %ebx
jmp 0x250fa
leaq 0x89716(%rip), %rsi     # 0xae6bf
movq %r14, %rdi
xorl %eax, %eax
callq 0xd600
testq %rax, %rax
jne 0x250f7
movq 0x8(%rsp), %rdi
callq 0x235f4
testb %bpl, %bpl
je 0x24fd4
leaq 0x898f5(%rip), %rsi     # 0xae8c7
jmp 0x24fdb
leaq 0x898ea(%rip), %rsi     # 0xae8c5
movq %r14, %rdi
xorl %eax, %eax
callq 0xd600
testq %rax, %rax
jne 0x250f7
movq 0x8(%r13), %rcx
movabsq $-0x4db4989f9014f113, %rax # imm = 0xB24B67606FEB0EED
cmpq %rax, %rcx
je 0x25094
testq %rcx, %rcx
je 0x250ae
leaq 0x898b5(%rip), %rsi     # 0xae8ca
jmp 0x250a2
leaq 0x8969f(%rip), %rsi     # 0xae6c0
movq %r14, %rdi
xorl %eax, %eax
callq 0xd600
testq %rax, %rax
jne 0x250f7
callq 0x2637f
leaq 0x18(%rsp), %rbx
movabsq $-0x7850996cdf80346a, %rdx # imm = 0x87AF6693207FCB96
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movq %rax, %r12
callq 0xe090
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movq %rax, %r13
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x1fc8a
testq %rax, %rax
jne 0x250f7
jmp 0x24fc6
cmpq $0x0, 0x20(%r13)
je 0x250ae
leaq 0x89854(%rip), %rsi     # 0xae8f6
movq %r14, %rdi
xorl %eax, %eax
callq 0xd7c4
jmp 0x250f7
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
cmpq %rax, 0x28(%rcx)
jne 0x250c4
cmpq $0x0, 0x40(%rcx)
je 0x25116
leaq 0x88e84(%rip), %rsi     # 0xadf4f
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1d59d
testq %rax, %rax
jne 0x250f7
movq %r14, %rdi
movq %r12, %rsi
callq 0x1e42a
leaq 0xa3df8(%rip), %rsi     # 0xc8ee7
movq %r14, %rdi
callq 0x1d59d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x71b64
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x88e29(%rip), %rsi     # 0xadf46
jmp 0x250cb