// File: /workspace/github_c_makefile_star2_O2/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_trans_typespec_assign
er_t xoico_che_s_trans_typespec_assign( xoico_che_s* o, x_source* source, xoico_che_result* result, const xoico_typespec_s* in_typespec, xoico_typespec_s* out_typespec )
{
    // xoico_che_trans_typespec.x:463:1
    BLM_INIT_LEVEL(0);
    BLM_TRY(x_source_parse_fa(source,"=" ))
    BLM_TRY(xoico_che_result_a_push_sc(result,"=" ))
    
    if( in_typespec->indirection > 0 && xoico_che_s_is_group(o,in_typespec->type ) )
    {BLM_INIT_LEVEL(1);
        xoico_typespec_s* typespec_rval = ((xoico_typespec_s*)BLM_LEVEL_T_PUSH(0,xoico_typespec_s,xoico_typespec_s_create()));
        xoico_che_result_arr_s* result_rval = ((xoico_che_result_arr_s*)BLM_LEVEL_T_PUSH(1,xoico_che_result_arr_s,xoico_che_result_arr_s_create()));
        BLM_TRY(xoico_che_s_trans_expression(o,source,((xoico_che_result*)( result_rval)), typespec_rval ))
    
        if
        (
            xoico_che_s_is_group(o,typespec_rval->type ) ||
            xoico_che_s_is_stamp(o,typespec_rval->type ) ||
            ( xoico_che_s_is_type(o,typespec_rval->type ) && !xoico_typespec_s_is_ptr_type(typespec_rval) )
        )
        {
            if( typespec_rval->indirection != in_typespec->indirection )
            {
                BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Non declarative assignment: Indirection mismatch." ))
            }
    
            if( typespec_rval->type != in_typespec->type )
            {
                BLM_TRY(xoico_che_s_adapt_expression(o,source, typespec_rval, in_typespec,((const xoico_che_result*)( result_rval)), result ))
            }
            else
            {
                xoico_che_result_a_push_result_d(result,((xoico_che_result*)(((xoico_che_result_arr_s*)bcore_fork(result_rval)) )));
            }
        }
        else
        {
            xoico_che_result_a_push_result_d(result,((xoico_che_result*)(((xoico_che_result_arr_s*)bcore_fork(result_rval)) )));
        }
    BLM_DOWN();}
    else
    {
        BLM_TRY(xoico_che_s_trans_expression(o,source, result, NULL ))
    }
    
    if( out_typespec ) xoico_typespec_s_copy(out_typespec,in_typespec );
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0xf40af(%rip), %rax     # 0x117dd0
movq (%rax), %rsi
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x717f5
andq $0x0, 0x10(%rbp)
leaq 0x882ff(%rip), %rsi     # 0xac03c
movq %r12, %rdi
xorl %eax, %eax
callq 0xd600
testq %rax, %rax
jne 0x23e26
leaq 0x882e5(%rip), %rsi     # 0xac03c
movq %r15, %rdi
callq 0x1d59d
testq %rax, %rax
jne 0x23e26
cmpq $0x0, 0x20(%rbx)
jle 0x23e0d
movq 0x8(%rbx), %rsi
movq %r13, %rdi
callq 0x1e874
testb %al, %al
je 0x23e0d
leaq 0x48(%rsp), %rbp
movq %rbp, 0x10(%rsp)
leaq 0x18(%rsp), %rsi
movq %rbp, %rdi
callq 0x717f5
movq $0x1, 0x10(%rbp)
callq 0xe090
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movq %rbp, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x71967
movq %rax, %rbp
callq 0x2637f
pushq $0x1
popq %rsi
movabsq $-0x7850996cdf80346a, %rdx # imm = 0x87AF6693207FCB96
leaq 0x48(%rsp), %rdi
movq %rax, %rcx
callq 0x71967
movq %r13, %rdi
movq %r12, %rsi
movq %rax, (%rsp)
movq %rax, %rdx
movq %rbp, 0x8(%rsp)
movq %rbp, %rcx
callq 0x1fc8a
testq %rax, %rax
je 0x23e45
movq %rax, %rbp
leaq 0x48(%rsp), %rdi
jmp 0x23e2e
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x1fc8a
testq %rax, %rax
je 0x23ef1
movq %rax, %rbp
leaq 0x18(%rsp), %rdi
callq 0x71b64
movq %rbp, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rbp
movq 0x8(%rbp), %rsi
movq %r13, %rdi
callq 0x1e874
testb %al, %al
jne 0x23e6a
movq 0x8(%rbp), %rsi
movq %r13, %rdi
callq 0x1e881
testb %al, %al
je 0x23eb7
movq 0x20(%rbp), %rax
cmpq 0x20(%rbx), %rax
jne 0x23ea1
movq 0x8(%rbp), %rax
cmpq 0x8(%rbx), %rax
je 0x23ed3
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
movq (%rsp), %r8
movq %r15, %r9
callq 0x1e44c
testq %rax, %rax
jne 0x23e03
jmp 0x23ee7
leaq 0x8a611(%rip), %rsi     # 0xae4b9
movq %r12, %rdi
xorl %eax, %eax
callq 0xd7c4
jmp 0x23e03
movq 0x8(%rbp), %rsi
movq %r13, %rdi
callq 0x1e88a
testb %al, %al
je 0x23ed3
movq %rbp, %rdi
callq 0xed60
testb %al, %al
je 0x23e6a
movq (%rsp), %rdi
callq 0x6026d
movq %r15, %rdi
movq %rax, %rsi
callq 0x1de41
leaq 0x10(%rsp), %rdi
callq 0x71b48
testq %r14, %r14
je 0x23f01
movq %r14, %rdi
movq %rbx, %rsi
callq 0xe075
leaq 0x18(%rsp), %rdi
callq 0x71b64
xorl %ebp, %ebp
jmp 0x23e33