// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore.xo.c
// Function: x_btcl_functor_s_setup
er_t x_btcl_functor_s_setup( x_btcl_functor_s* o, const x_source_point_s* sp, x_btcl_function_s* function, x_btcl_frame_s* lexical_frame )
{
    // bcore_x_btcl_functor.x:155:5
    BLM_INIT_LEVEL(0);
    x_source_point_s_copy(&(o->sp),sp );
    sz_t args = function->signature->arg_list.size;
    x_btcl_functor_arg_arr_s_set_size(&(o->arg_arr),args );
    bcore_arr_sr_s* arr_sr = bcore_arr_sr_s_set_size(((bcore_arr_sr_s*)BLM_LEVEL_T_PUSH(0,bcore_arr_sr_s,bcore_arr_sr_s_create())),args );
    for(sz_t i = 0; i < args; i++ )
    {
        sr_s_asc(&(arr_sr->data[ i ]),((x_btcl_functor_arg_uop_s*)bcore_fork(x_btcl_functor_arg_s_get_uop(&(o->arg_arr.data[ i ])))) );
        o->arg_arr.data[ i ].name = x_btcl_signature_s_arg_name(function->signature,i );
    }
    BLM_TRY(x_btcl_function_s_call(function,&(o->sp), lexical_frame, arr_sr, BCORE_PASS_CREATE(sr_s,o->op_tree) ))
    BLM_RETURNV(er_t, 0)
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq 0x1575fe(%rip), %rax    # 0x1b2330
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xbfe80
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movq -0x18(%rbp), %rsi
callq 0x42ed0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movq -0x70(%rbp), %rsi
callq 0x71e60
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
movb $0x0, %al
callq 0x97ba0
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
movabsq $-0x78ea303a4f284a4, %rdx # imm = 0xF8715CFC5B0D7B5C
callq 0xc01a0
movq %rax, %rdi
movq -0x70(%rbp), %rsi
callq 0x97d70
movq %rax, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x70(%rbp), %rax
jge 0x5ae6b
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
imulq $0x18, -0x80(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x80(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x71cd0
movq %rax, %rdi
callq 0x9d3d0
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0x616b0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x80(%rbp), %rsi
callq 0x72180
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x80(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x5addb
movq -0x20(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x10(%rbp), %rax
addq $0x30, %rax
movq %rax, -0xc0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
leaq 0xa1106(%rip), %rsi     # 0xfbfb0
callq 0x4e3c0
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0xb0(%rbp), %rcx
movq %rax, %r8
callq 0x680d0
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x5af08
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x68(%rbp), %rdi
callq 0xc0720
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5af27
movq $0x0, -0x98(%rbp)
movq -0x68(%rbp), %rdi
callq 0xc0720
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)