// File: /workspace/github_c_makefile_star2_O3/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, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
movq 0x80(%rsp), %r12
leaq 0x1578d2(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xd6675
movq $0x0, 0x10(%rbx)
testq %r12, %r12
je 0x44545
xorl %ebx, %ebx
movq %rbx, 0x10(%r12)
movq 0x18(%r12), %rdi
callq 0xfafc
movq %rbx, 0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movq %rbx, 0x26(%r12)
movb $0x1, 0x2e(%r12)
testq %r14, %r14
je 0x4455f
testb %bpl, %bpl
je 0x44652
leaq 0xff493(%rip), %rsi     # 0x1439ed
jmp 0x44659
leaq 0xed35a(%rip), %rsi     # 0x1318c0
movq %r15, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x448e9
movq (%r15), %rbx
leaq 0x158745(%rip), %rax    # 0x19ccc8
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbx, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbx, %rdx
je 0x445d9
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbx, %rdx
je 0x445d9
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbx, %rdx
je 0x445d9
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbx, %rdx
jne 0x445e2
movq (%rax,%rcx), %r14
testq %r14, %r14
jne 0x44609
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %rbx, %rsi
callq 0xe9bc5
movq %rax, %r14
leaq 0x1586ca(%rip), %rdi    # 0x19ccc8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x115fac
leaq 0xe8fbc(%rip), %rdx     # 0x12d5cc
movq %r14, %rdi
movq %r15, %rsi
callq 0xffe2b
testb %al, %al
je 0x44768
movq 0x10(%rsp), %r14
incq 0x30(%r14)
movq %r14, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x3d43e
testq %rax, %rax
jne 0x448e9
decq 0x30(%r14)
xorl %ebx, %ebx
jmp 0x448ec
leaq 0xed066(%rip), %rsi     # 0x1316bf
movq %r15, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x448e9
movq 0x8(%rsp), %rdi
movq (%rdi), %rbx
leaq 0x150e35(%rip), %rax    # 0x1954b0
movl 0x150e2f(%rip), %ecx    # 0x1954b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbx, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbx, %rdx
je 0x446d5
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbx, %rdx
je 0x446d5
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbx, %rdx
je 0x446d5
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbx, %rdx
jne 0x446de
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x4470a
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %rbx, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0x150db6(%rip), %rdi    # 0x1954b0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x8(%rsp), %rdi
callq *0x10(%r12)
testb %bpl, %bpl
je 0x4471d
leaq 0xed1ac(%rip), %rsi     # 0x1318c7
jmp 0x44724
leaq 0xed1a1(%rip), %rsi     # 0x1318c5
movq %r15, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x448e9
movq 0x8(%r13), %rcx
movabsq $-0x4db4989f9014f113, %rax # imm = 0xB24B67606FEB0EED
cmpq %rax, %rcx
je 0x447e6
testq %rcx, %rcx
movq 0x8(%rsp), %r12
je 0x44808
leaq 0xed167(%rip), %rsi     # 0x1318ca
jmp 0x447f9
leaq 0xecf51(%rip), %rsi     # 0x1316c0
movq %r15, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x448e9
callq 0x46f7e
leaq 0x18(%rsp), %rbx
movabsq $-0x7850996cdf80346a, %rdx # imm = 0x87AF6693207FCB96
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r14
callq 0xffc0
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r13
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x3a94e
testq %rax, %rax
jne 0x448e9
jmp 0x4470f
cmpq $0x0, 0x20(%r13)
movq 0x8(%rsp), %r12
je 0x44808
leaq 0xed0fd(%rip), %rsi     # 0x1318f6
movq %r15, %rdi
xorl %eax, %eax
callq 0xde10
jmp 0x448e9
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
cmpq %rax, 0x28(%rcx)
jne 0x44822
cmpq $0x0, 0x40(%rcx)
je 0x44908
movq (%r12), %rbx
leaq 0x150c83(%rip), %rax    # 0x1954b0
movl 0x150c7d(%rip), %ecx    # 0x1954b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbx, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbx, %rdx
je 0x44887
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbx, %rdx
je 0x44887
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbx, %rdx
je 0x44887
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbx, %rdx
jne 0x44890
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x448bc
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %rbx, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x150c04(%rip), %rdi    # 0x1954b0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x8(%rsp), %r12
leaq 0xec68c(%rip), %rsi     # 0x130f4f
movq %r12, %rdi
callq *0x20(%r15)
testq %rax, %rax
jne 0x448e9
movq %r12, %rdi
movq %r14, %rsi
callq 0x37b5f
leaq 0x106684(%rip), %rsi    # 0x14af65
movq %r12, %rdi
callq 0x328fe
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xd6d2c
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rbx
leaq 0x150b9d(%rip), %rax    # 0x1954b0
movl 0x150b97(%rip), %ecx    # 0x1954b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbx, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbx, %rdx
je 0x4496d
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbx, %rdx
je 0x4496d
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbx, %rdx
je 0x4496d
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbx, %rdx
jne 0x44976
movq (%rax,%rcx), %r15
testq %r15, %r15
jne 0x449a2
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %rbx, %rsi
callq 0xe9bc5
movq %rax, %r15
leaq 0x150b1e(%rip), %rdi    # 0x1954b0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x115fac
movq 0x8(%rsp), %r12
leaq 0xec59d(%rip), %rsi     # 0x130f46
jmp 0x448c3