// File: /workspace/github_c_makefile_star2_O3/johsteffens[P]beth/xoico/src/xoico.xo.c
// Function: xoico_che_s_trans_builtin_fork
er_t xoico_che_s_trans_builtin_fork( 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:367:1
    BLM_INIT_LEVEL(0);
    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_INIT_LEVEL(1);
        BLM_TRY(x_source_parse_fa(source,"fork ( " ))
        xoico_che_result_arr_s* result = ((xoico_che_result_arr_s*)BLM_LEVEL_T_PUSH(1,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));
    BLM_DOWN();}
    
    xoico_typespec_s* typespec_fork = ((xoico_typespec_s*)BLM_LEVEL_T_PUSH(0,xoico_typespec_s,xoico_typespec_s_clone(typespec_expr)));
    typespec_fork->access_class = TYPEOF_discardable;
    
    BLM_TRY(xoico_che_result_a_push_sc(result_out,"((" ))
    
    if( source_without_brackets )
    {
        BLM_TRY(x_source_parse_fa(source," " ))
    }
    else
    {
        BLM_TRY(x_source_parse_fa(source," )" ))
    }
    
    if( typespec_fork->type        == 0 ) BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Operator 'fork': Expression not tractable." ))
    if( typespec_fork->indirection != 1 ) BLM_RETURNV(er_t, x_source_parse_error_fa(source,"Operator 'fork': Expression's indirection != 1." ))
    
    BLM_TRY(xoico_che_s_push_typespec(o,typespec_fork, result_out ))
    BLM_TRY(xoico_che_result_a_push_sc(result_out,")bcore_fork(" ))
    xoico_che_result_a_push_result_c(result_out,result_expr );
    BLM_TRY(xoico_che_result_a_push_sc(result_out,"))" ))
    
    if( typespec_out ) xoico_typespec_s_copy(typespec_out,typespec_fork );
    
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, (%rsp)
movq %r8, %r13
movq %rcx, %r12
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x157c92(%rip), %rax    # 0x19bdd0
movq (%rax), %rsi
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0xd6675
movq $0x0, 0x10(%rbx)
testq %r12, %r12
movl %r15d, 0xc(%rsp)
je 0x44175
testb %r15b, %r15b
je 0x44217
leaq 0xff87d(%rip), %rsi     # 0x1439ed
jmp 0x4421e
leaq 0x58(%rsp), %rbx
movq %rbx, 0x50(%rsp)
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0xd6675
movq $0x1, 0x10(%rbx)
leaq 0xed6b5(%rip), %rsi     # 0x131850
movq %r14, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x4420a
callq 0x46f7e
leaq 0x58(%rsp), %rbx
movabsq $-0x7850996cdf80346a, %rdx # imm = 0x87AF6693207FCB96
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r12
callq 0xffc0
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movq %rax, %r13
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x3a94e
testq %rax, %rax
je 0x44478
movq %rax, %r15
leaq 0x58(%rsp), %rdi
jmp 0x444b2
leaq 0xed4a1(%rip), %rsi     # 0x1316bf
movq %r14, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x444aa
movq %rbp, 0x18(%rsp)
movq (%rsp), %rbp
movq (%rbp), %r15
leaq 0x15126b(%rip), %rax    # 0x1954b0
movl 0x151265(%rip), %ecx    # 0x1954b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r15, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x4429f
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x4429f
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x4429f
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x442a8
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
jne 0x442d3
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %rbx
leaq 0x1511ec(%rip), %rdi    # 0x1954b0
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq (%rsp), %rbp
movq %rbp, %rdi
callq *0x10(%rbx)
movq %r13, %rdi
callq 0x10128
leaq 0x20(%rsp), %rdi
movabsq $-0x641110359430e9c5, %rdx # imm = 0x9BEEEFCA6BCF163B
xorl %esi, %esi
movq %rax, %rcx
callq 0xd68a8
movabsq $-0x12e90733f18038df, %rcx # imm = 0xED16F8CC0E7FC721
movq %rax, 0x10(%rsp)
movq %rcx, 0x10(%rax)
movq (%rbp), %r15
leaq 0x151198(%rip), %rax    # 0x1954b0
movl 0x151192(%rip), %ecx    # 0x1954b0
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x20(%rax,%rcx,8), %rdx
movq 0x18(%rax,%rcx,8), %rcx
andq %r15, %rcx
shlq $0x4, %rcx
leaq (%rdx,%rcx), %rax
movq (%rdx,%rcx), %rdx
movl $0x8, %ecx
cmpq %r15, %rdx
je 0x44372
movq 0x10(%rax), %rdx
movl $0x18, %ecx
cmpq %r15, %rdx
je 0x44372
movq 0x20(%rax), %rdx
movl $0x28, %ecx
cmpq %r15, %rdx
je 0x44372
movq 0x30(%rax), %rdx
movl $0x38, %ecx
cmpq %r15, %rdx
jne 0x4437b
movq (%rax,%rcx), %r13
testq %r13, %r13
jne 0x443a6
movabsq $-0x3dfc7e0a250a30dc, %rdi # imm = 0xC20381F5DAF5CF24
movq %r15, %rsi
callq 0xe9bc5
movq %rax, %r13
leaq 0x151119(%rip), %rdi    # 0x1954b0
movq %r15, %rsi
movq %rax, %rdx
callq 0x115fac
movq (%rsp), %rbp
leaq 0xed214(%rip), %rsi     # 0x1315c1
movq %rbp, %rdi
callq *0x20(%r13)
testq %rax, %rax
movq 0x18(%rsp), %rbx
jne 0x444aa
cmpb $0x0, 0xc(%rsp)
je 0x443d2
leaq 0xff61d(%rip), %rsi     # 0x1439ed
jmp 0x443d9
leaq 0x106b8b(%rip), %rsi    # 0x14af64
movq %r14, %rdi
xorl %eax, %eax
callq 0xda80
testq %rax, %rax
jne 0x444aa
movq 0x10(%rsp), %rsi
cmpq $0x0, 0x8(%rsi)
je 0x44490
cmpq $0x1, 0x20(%rsi)
jne 0x44499
movq %rbx, %rdi
movq (%rsp), %rbx
movq %rbx, %rdx
callq 0x32522
testq %rax, %rax
jne 0x444aa
leaq 0xed48d(%rip), %rsi     # 0x1318b3
movq %rbx, %rdi
callq 0x328fe
testq %rax, %rax
jne 0x444aa
movq %rbx, %rdi
movq %r12, %rsi
callq 0x37b5f
leaq 0xebf96(%rip), %rsi     # 0x1303db
movq %rbx, %rdi
callq 0x328fe
testq %rax, %rax
jne 0x444aa
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x44469
movq 0x10(%rsp), %rsi
callq 0xfef3
leaq 0x20(%rsp), %rdi
callq 0xd6d2c
xorl %r15d, %r15d
jmp 0x444b7
movq %rbp, 0x18(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd6d0d
movq (%rsp), %rbp
jmp 0x442d9
leaq 0xed3c1(%rip), %rsi     # 0x131858
jmp 0x444a0
leaq 0xed3e3(%rip), %rsi     # 0x131883
movq %r14, %rdi
xorl %eax, %eax
callq 0xde10
movq %rax, %r15
leaq 0x20(%rsp), %rdi
callq 0xd6d2c
movq %r15, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq