// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_trans_typespec_expression
er_t xoico_che_s_trans_typespec_expression( 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:518:1
    BLM_INIT_LEVEL(0);
    if( out_typespec ) out_typespec->type = 0;
    BLM_TRY(xoico_che_s_trans_whitespace(o,source, result ))
    
    u0_t c[ 2 ];
    x_source_inspect_data(source,((x_inst*)(c)), sizeof( c ) );
    
    if( ( c[0] == '.' && c[1] != '.' ) || ( c[0] == '-' && c[1] == '>' ) )
    {
        BLM_TRY(xoico_che_s_trans_typespec_member(o,source, result, in_typespec, out_typespec ))
    }
    else if( c[0] == '[' )
    {
        BLM_TRY(xoico_che_s_trans_typespec_array_subscript(o,source, result, in_typespec, out_typespec ))
    }
    else if( c[0] == '(' )
    {BLM_INIT_LEVEL(2);
        xoico_compiler_element_info_s* info = ((xoico_compiler_element_info_s*)BLM_LEVEL_T_PUSH(2,xoico_compiler_element_info_s,xoico_compiler_element_info_s_create()));
        if( xoico_compiler_s_get_type_member_function_info(o->compiler,in_typespec->type, xoico_che_s_entypeof(o,"_" ), info ) )
        {BLM_INIT_LEVEL(3);
            xoico_typespec_s* typespec_ret = ((xoico_typespec_s*)BLM_LEVEL_T_PUSH(3,xoico_typespec_s,xoico_typespec_s_create()));
            xoico_che_result* result_object_expr = ((xoico_che_result*)BLM_LEVEL_A_PUSH(3,xoico_che_result_a_clone(result)));
            xoico_che_result_a_clear(result);
            BLM_TRY(xoico_che_s_trans_function(o,source, false, info->func, result_object_expr, in_typespec, result, typespec_ret ))
            BLM_TRY(xoico_che_s_trans_typespec_expression(o,source, result, typespec_ret, out_typespec ))
        BLM_DOWN();}
        else
        {
            BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Object has no compact function.\n" ))
        }
    BLM_DOWN();}
    // create if not present
    else if( c[0] =='!' && c[1] != '=' )
    {
        BLM_TRY(xoico_che_s_trans_typespec_create(o,source, result, in_typespec, out_typespec ))
    }
    // test for presence
    else if( c[0] == '?' && c[1] == '.' )
    {
        BLM_TRY(xoico_che_s_trans_typespec_test_presence(o,source, result, in_typespec, out_typespec ))
    }
    // attach (detach)
    else if( c[0] == '=' && c[1] == '<' )
    {
        BLM_TRY(xoico_che_s_trans_typespec_attach(o,source, result, in_typespec, out_typespec ))
    }
    // assign
    else if( c[0] == '=' && c[1] != '=' )
    {
        BLM_TRY(xoico_che_s_trans_typespec_assign(o,source, result, in_typespec, out_typespec ))
    }
    // ternary branch operator
    else if( c[0] == '?' )
    {
        BLM_TRY(xoico_che_s_trans_ternary_branch(o,source, result, out_typespec ))
    }
    // scope
    else if( c[0] == '^' && in_typespec->indirection != 0 ) // for indirection 0 '^' is the xor operator
    {BLM_INIT_LEVEL(2);
        xoico_che_result* result_local = ((xoico_che_result*)BLM_LEVEL_A_PUSH(0,xoico_che_result_a_clone(result)));
        xoico_che_result_a_clear(result);
        xoico_typespec_s* typespec_scope = ((xoico_typespec_s*)BLM_LEVEL_T_PUSH(2,xoico_typespec_s,xoico_typespec_s_create()));
        BLM_TRY(xoico_che_s_trans_builtin_scope(o,source, result_local, in_typespec, result, typespec_scope ))
        BLM_TRY(xoico_che_s_trans_typespec_expression(o,source, result, typespec_scope, out_typespec ))
    BLM_DOWN();}
    else 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 $0xc8, %rsp
movq %r8, %rbx
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq 0x161f70(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0xd6675
movq $0x0, 0x10(%r12)
testq %rbx, %rbx
je 0x39e86
movq $0x0, 0x8(%rbx)
movq %r15, %rsi
movq %r14, %rdx
callq 0x34da0
movq (%r15), %rbp
leaq 0x162e2d(%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 %rbp, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x39ef1
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x39ef1
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x39ef1
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x39efa
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x39f21
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %rbp, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0x162db2(%rip), %rdi    # 0x19ccc8
movq %rbp, %rsi
movq %rax, %rdx
callq 0x115fac
leaq 0x16(%rsp), %rbp
movl $0x2, %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0xff7e2
movzbl (%rbp), %eax
cmpl $0x2e, %eax
sete %dl
movb 0x1(%rbp), %cl
cmpb $0x2e, %cl
setne %sil
testb %sil, %dl
jne 0x39f62
movl %eax, %edx
xorb $0x2d, %dl
movl %ecx, %esi
xorb $0x3e, %sil
orb %dl, %sil
jne 0x39f92
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x408e3
testq %rax, %rax
je 0x3a342
movq %rax, %r12
leaq 0x38(%rsp), %rdi
callq 0xd6d2c
jmp 0x3a34f
cmpl $0x28, %eax
je 0x39fb7
cmpl $0x5b, %eax
jne 0x3a14b
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x41a3f
jmp 0x39f77
leaq 0x68(%rsp), %r12
movq %r12, 0x30(%rsp)
leaq 0x38(%rsp), %rsi
movq %r12, %rdi
callq 0xd6675
movq $0x2, 0x10(%r12)
callq 0x304e8
movabsq $0x2b083548d3276fd7, %rdx # imm = 0x2B083548D3276FD7
movl $0x2, %esi
movq %r12, %rdi
movq %rax, %rcx
callq 0xd68a8
movq %r13, %rcx
movq %rax, %r13
movq 0x18(%rcx), %r12
movq (%rsp), %rax
movq 0x8(%rax), %rbp
movq %rcx, 0x8(%rsp)
leaq 0xb0(%rcx), %rdi
leaq 0xf6b59(%rip), %rsi     # 0x130b74
callq 0xd3d8e
movq %r12, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %r13, 0x28(%rsp)
movq %r13, %rcx
callq 0x313b5
testb %al, %al
je 0x3a17b
leaq 0x98(%rsp), %r12
movq %r12, 0x18(%rsp)
leaq 0x68(%rsp), %rsi
movq %r12, %rdi
callq 0xd6675
movq $0x3, 0x10(%r12)
callq 0xffc0
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movl $0x3, %esi
movq %r12, %rdi
movq %rax, %rcx
callq 0xd68a8
movq %rax, 0x20(%rsp)
testq %r14, %r14
je 0x3a1f1
movq (%r14), %rsi
movabsq $-0x2c7f7969b22e7014, %rdi # imm = 0xD38086964DD18FEC
callq 0x116fb0
movq (%r14), %rbp
leaq 0x1623be(%rip), %rax    # 0x19c468
movl (%rax), %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbp, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
movq 0x8(%rsp), %r13
je 0x3a105
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x3a105
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x3a105
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x3a10e
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x3a135
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %rbp, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0x16233e(%rip), %rdi    # 0x19c468
movq %rbp, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r12, %rdi
movq %r14, %rsi
callq *0xc0(%r12)
movq %rax, %rdx
jmp 0x3a1f8
cmpl $0x21, %eax
sete %dl
cmpb $0x3d, %cl
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x3a199
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x41c49
jmp 0x39f77
leaq 0xf7369(%rip), %rsi     # 0x1314eb
movq %r15, %rdi
xorl %eax, %eax
callq 0xde10
movq %rax, %r12
leaq 0x68(%rsp), %rdi
jmp 0x39f88
movl %eax, %edx
xorb $0x3f, %dl
movl %ecx, %esi
xorb $0x2e, %sil
orb %dl, %sil
jne 0x3a1c3
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x41ee2
jmp 0x39f77
movl %eax, %edx
xorb $0x3d, %dl
movl %ecx, %esi
xorb $0x3c, %sil
orb %dl, %sil
jne 0x3a301
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x422a9
jmp 0x39f77
xorl %edx, %edx
movq 0x8(%rsp), %r13
leaq 0x98(%rsp), %rdi
movl $0x3, %esi
callq 0xd6b17
movq %rax, 0x8(%rsp)
movq (%r14), %rbp
leaq 0x15b297(%rip), %rax    # 0x1954b0
movl 0x15b291(%rip), %ecx    # 0x1954b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %rbp, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %rbp, %rdx
je 0x3a273
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x3a273
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x3a273
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x3a27c
movq (%rax,%rcx), %r12
testq %r12, %r12
jne 0x3a2a3
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %rbp, %rsi
callq 0xe9bc5
movq %rax, %r12
leaq 0x15b218(%rip), %rdi    # 0x1954b0
movq %rbp, %rsi
movq %rax, %rdx
callq 0x115fac
movq %r14, %rdi
callq *0x10(%r12)
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rcx
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq 0x8(%rsp), %r8
movq (%rsp), %r9
movq 0x20(%rsp), %rbp
pushq %rbp
pushq %r14
callq 0x3c410
addq $0x10, %rsp
testq %rax, %rax
jne 0x3a2f4
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x39e38
testq %rax, %rax
je 0x3a32e
movq %rax, %r12
movq 0x18(%rsp), %rdi
jmp 0x39f88
cmpl $0x3d, %eax
sete %dl
cmpb $0x3d, %cl
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x3a364
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq (%rsp), %rcx
movq %rbx, %r8
callq 0x42693
jmp 0x39f77
leaq 0x18(%rsp), %rdi
callq 0xd6d0d
leaq 0x30(%rsp), %rdi
callq 0xd6d0d
leaq 0x38(%rsp), %rdi
callq 0xd6d2c
xorl %r12d, %r12d
movq %r12, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3f, %eax
jne 0x3a37f
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3a6ff
jmp 0x39f77
cmpl $0x5e, %eax
jne 0x3a446
movq (%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x3a446
leaq 0x68(%rsp), %rbp
movq %rbp, 0x98(%rsp)
leaq 0x38(%rsp), %rsi
movq %rbp, %rdi
callq 0xd6675
movq $0x2, 0x10(%rbp)
movq %r14, %rdi
callq 0x418f1
movq %rbp, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xd6b17
movq %rax, %r12
movq %r14, %rdi
callq 0x41768
callq 0xffc0
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movl $0x2, %esi
movq %rbp, %rdi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %rbp
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq (%rsp), %rcx
movq %r14, %r8
movq %rax, %r9
callq 0x3967a
testq %rax, %rax
jne 0x3a18c
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %rbx, %r8
callq 0x39e38
testq %rax, %rax
jne 0x3a18c
leaq 0x98(%rsp), %rdi
jmp 0x3a33d
testq %rbx, %rbx
je 0x3a342
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0xfef3
jmp 0x3a342