// File: /workspace/github_c_makefile_star2_O1/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 $0xd8, %rsp
movq %r8, %rbx
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x16bee6(%rip), %rax    # 0x1a8dd0
movq (%rax), %rsi
leaq 0x48(%rsp), %r13
movq %r13, %rdi
callq 0xe0431
movq $0x0, 0x10(%r13)
testq %rbx, %rbx
je 0x3cf0f
movq $0x0, 0x8(%rbx)
movq %r15, %rsi
movq %r14, %rdx
callq 0x374b3
movq (%r15), %rbp
leaq 0x16cda4(%rip), %rax    # 0x1a9cc8
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 0x3cf7e
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x3cf7e
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x3cf7e
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x3d23f
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x3cfae
movabsq $-0x7e8ee9b9b4bbaa8, %rdi # imm = 0xF817116464B44558
movq %rbp, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x16cd25(%rip), %rdi    # 0x1a9cc8
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12128c
leaq 0x36(%rsp), %rbp
movl $0x2, %ecx
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x10a3cb
movzbl (%rbp), %eax
cmpl $0x2e, %eax
sete %dl
movb 0x1(%rbp), %cl
cmpb $0x2e, %cl
setne %sil
testb %sil, %dl
jne 0x3cfef
movl %eax, %edx
xorb $0x2d, %dl
movl %ecx, %esi
xorb $0x3e, %sil
orb %dl, %sil
jne 0x3d044
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x44838
movq %rax, %rbx
testq %rax, %rax
je 0x3d01c
leaq 0x48(%rsp), %rdi
callq 0xe0b30
movq %rbx, %rbp
jmp 0x3d01e
xorl %ebp, %ebp
testq %rbx, %rbx
jne 0x3d02f
leaq 0x48(%rsp), %rdi
callq 0xe0b30
xorl %ebp, %ebp
movq %rbp, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x28, %eax
je 0x3d06a
cmpl $0x5b, %eax
jne 0x3d20e
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x45dd2
jmp 0x3d005
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
leaq 0x48(%rsp), %rsi
callq 0xe0431
movq 0x20(%rsp), %r13
movq $0x2, 0x10(%r13)
callq 0x325ab
movabsq $0x2b083548d3276fd7, %rdx # imm = 0x2B083548D3276FD7
movl $0x2, %esi
movq %r13, %rdi
movq %rax, %rcx
callq 0xe0676
movq %r12, %rcx
movq %rax, %r12
movq 0x18(%rcx), %r13
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rbp
movq %rcx, 0x10(%rsp)
leaq 0xb0(%rcx), %rdi
leaq 0xfeaa1(%rip), %rsi     # 0x13bb74
callq 0xddb52
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %r12, 0x28(%rsp)
movq %r12, %rcx
callq 0x3357f
testb %al, %al
je 0x3d247
movq 0x20(%rsp), %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xe0431
movq 0x18(%rsp), %r13
movq $0x3, 0x10(%r13)
callq 0x10060
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movl $0x3, %esi
movq %r13, %rdi
movq %rax, %rcx
callq 0xe0676
movq %rax, 0x38(%rsp)
testq %r14, %r14
je 0x3d2c6
movq %r13, 0x40(%rsp)
movq (%r14), %rsi
movabsq $-0x2c7f7969b22e7014, %rdi # imm = 0xD38086964DD18FEC
callq 0x1222bd
movq (%r14), %rbp
leaq 0x16c303(%rip), %rax    # 0x1a9468
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 0x10(%rsp), %r12
je 0x3d1c4
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x3d1c4
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x3d1c4
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x3d58a
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x3d1f4
movabsq $0x782b96602f424981, %rdi # imm = 0x782B96602F424981
movq %rbp, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x16c27f(%rip), %rdi    # 0x1a9468
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r13, %rdi
movq %r14, %rsi
callq *0xc0(%r13)
movq %rax, %rdx
movq 0x40(%rsp), %r13
jmp 0x3d2cd
cmpl $0x21, %eax
sete %dl
cmpb $0x3d, %cl
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x3d26c
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x46073
jmp 0x3d005
xorl %r13d, %r13d
jmp 0x3cf82
leaq 0xff29d(%rip), %rsi     # 0x13c4eb
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0xddb2
movq %rax, %rbp
movq 0x20(%rsp), %rdi
callq 0xe0b30
jmp 0x3d40a
movl %eax, %edx
xorb $0x3f, %dl
movl %ecx, %esi
xorb $0x2e, %sil
orb %dl, %sil
jne 0x3d297
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x46372
jmp 0x3d005
movl %eax, %edx
xorb $0x3d, %dl
movl %ecx, %esi
xorb $0x3c, %sil
orb %dl, %sil
jne 0x3d417
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x467cc
jmp 0x3d005
xorl %edx, %edx
movq 0x10(%rsp), %r12
movl $0x3, %esi
movq %r13, %rdi
callq 0xe0900
movq %rax, 0x10(%rsp)
movq (%r14), %rbp
leaq 0x1651c7(%rip), %rax    # 0x1a24b0
movl 0x1651c1(%rip), %ecx    # 0x1a24b0
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 0x3d347
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %rbp, %rdx
je 0x3d347
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %rbp, %rdx
je 0x3d347
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %rbp, %rdx
jne 0x3d46e
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x3d377
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %rbp, %rsi
callq 0xf3f85
movq %rax, %r13
leaq 0x165144(%rip), %rdi    # 0x1a24b0
movq %rbp, %rsi
movq %rax, %rdx
callq 0x12128c
movq %r14, %rdi
callq *0x10(%r13)
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rcx
xorl %ebp, %ebp
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %r9
pushq 0x38(%rsp)
pushq %r14
callq 0x3fbe7
addq $0x10, %rsp
movq %rax, %r13
testq %rax, %rax
je 0x3d3bf
movq 0x18(%rsp), %rdi
callq 0xe0b30
movq %r13, %rbp
testq %r13, %r13
jne 0x3d3f4
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x38(%rsp), %rcx
movq %rbx, %r8
callq 0x3cec1
movq %rax, %rbx
testq %rax, %rax
je 0x3d3ef
movq 0x18(%rsp), %rdi
callq 0xe0b30
movq %rbx, %rbp
testq %rbx, %rbx
je 0x3d445
xorl %eax, %eax
testb %al, %al
je 0x3d408
leaq 0x20(%rsp), %rdi
callq 0xe0b11
movb $0x1, %bl
jmp 0x3d40a
xorl %ebx, %ebx
testb %bl, %bl
jne 0x3d023
jmp 0x3d02f
cmpl $0x3d, %eax
sete %dl
cmpb $0x3d, %cl
setne %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x3d453
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x46cb5
jmp 0x3d005
leaq 0x18(%rsp), %rdi
callq 0xe0b11
movb $0x1, %al
jmp 0x3d3f6
cmpl $0x3f, %eax
jne 0x3d476
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3d886
jmp 0x3d005
xorl %r13d, %r13d
jmp 0x3d34b
cmpl $0x5e, %eax
jne 0x3d56f
movq 0x8(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x3d56f
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x78(%rsp)
leaq 0x48(%rsp), %rsi
callq 0xe0431
movq 0x78(%rsp), %r13
movq $0x2, 0x10(%r13)
movq %r14, %rdi
callq 0x45c7f
xorl %ebp, %ebp
movq %r13, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xe0900
movq %rax, 0x28(%rsp)
movq %r14, %rdi
callq 0x45aed
callq 0x10060
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movl $0x2, %esi
movq %r13, %rdi
movq %rax, %rcx
callq 0xe0676
movq %r12, %rdi
movq %r15, %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rcx
movq %r14, %r8
movq %rax, 0x8(%rsp)
movq %rax, %r9
callq 0x3c584
movq %rax, %r13
testq %rax, %rax
je 0x3d52b
movq 0x78(%rsp), %rdi
callq 0xe0b30
movq %r13, %rbp
testq %r13, %r13
jne 0x3d560
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
callq 0x3cec1
movq %rax, %rbx
testq %rax, %rax
je 0x3d55b
movq 0x78(%rsp), %rdi
callq 0xe0b30
movq %rbx, %rbp
testq %rbx, %rbx
je 0x3d592
xorl %eax, %eax
testb %al, %al
jne 0x3d023
jmp 0x3d02f
testq %rbx, %rbx
je 0x3d023
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0xff8e
jmp 0x3d023
xorl %r13d, %r13d
jmp 0x3d1c8
leaq 0x78(%rsp), %rdi
callq 0xe0b11
movb $0x1, %al
jmp 0x3d562