// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/parser_call.c
// Function: subtilis_parser_call_known_ptr
subtilis_exp_t *subtilis_parser_call_known_ptr(subtilis_parser_t *p,
					       subtilis_token_t *t,
					       const subtilis_type_t *type,
					       size_t reg,
					       subtilis_error_t *err)
{
	size_t i;
	subtilis_exp_t *args[SUBTILIS_MAX_ARGS];
	size_t num_args = 0;
	subtilis_parser_param_t *params = NULL;
	subtilis_ir_arg_t *ir_args = NULL;

	num_args = subtilis_var_bracketed_args_have_b(p, t, args,
						      SUBTILIS_MAX_ARGS, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	if (num_args != type->params.fn.num_params) {
		subtilis_error_set_bad_arg_count(
		    err, num_args, type->params.fn.num_params,
		    p->l->stream->name, p->l->line);
		goto on_error;
	}

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	params = prv_call_ptr_parameters(p, args, num_args, type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	ir_args = prv_parser_to_ir_args(params, num_args, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;
	prv_delete_params(params, num_args);
	params = NULL;

	p->current->proc_called = true;

	return subtilis_exp_add_call_ptr(p, ir_args, type->params.fn.ret_val,
					 reg, num_args, err);

on_error:
	free(ir_args);
	prv_delete_params(params, num_args);
	for (i = 0; i < num_args; i++)
		subtilis_exp_delete(args[i]);

	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r12
leaq 0x20(%rsp), %rdx
movl $0x20, %ecx
callq 0x1f31a
cmpl $0x0, (%r14)
je 0x1c0c3
xorl %r14d, %r14d
jmp 0x1c34b
movq %rax, %rbx
movq 0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1c2e5
movq (%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x12edc
cmpl $0x0, (%r14)
jne 0x1c311
imulq $0x158, %rbx, %rdi      # imm = 0x158
callq 0x121d0
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x1c360
testq %rbx, %rbx
je 0x1c3af
movq %r13, 0x18(%rsp)
leaq 0x3(%rbx), %rax
andq $-0x4, %rax
leaq -0x1(%rbx), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x574de(%rip), %xmm1    # 0x73610
movdqa 0x574e6(%rip), %xmm2    # 0x73620
movdqa 0x574ee(%rip), %xmm3    # 0x73630
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x574ee(%rip), %xmm5    # 0x73640
movq 0x8(%rsp), %rsi
movq %rsi, %rcx
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x1c194
movl $0x8, (%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x1c1ac
movl $0x8, 0x158(%rcx)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0x1c1ed
movl $0x8, 0x2b0(%rcx)
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x1c201
movl $0x8, 0x408(%rcx)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x560, %rcx            # imm = 0x560
addq $-0x4, %rax
jne 0x1c15a
movq %rbp, 0x10(%rsp)
movq %rsi, %rbp
xorl %r13d, %r13d
movq 0x20(%rsp,%r13,8), %rdx
cmpq $0x0, 0x160(%rdx)
movq 0x10(%rsp), %rax
movq 0x18(%rax,%r13,8), %rax
movq %r12, %rdi
je 0x1c253
movq %rax, %rsi
movq %r14, %rcx
callq 0x1d3d0
movq 0x20(%rsp,%r13,8), %r15
jmp 0x1c281
movq %rdx, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x37860
movq %rax, 0x20(%rsp,%r13,8)
cmpl $0x0, (%r14)
jne 0x1c384
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x36119
movq %rax, %r15
movq $0x0, 0x20(%rsp,%r13,8)
cmpl $0x0, (%r14)
jne 0x1c387
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2f457
cmpl $0x0, (%r14)
jne 0x1c387
movq 0x148(%r15), %rax
movq %rax, 0x148(%rbp)
movq $-0x1, 0x150(%rbp)
movq %r15, %rdi
callq 0x2b166
incq %r13
addq $0x158, %rbp            # imm = 0x158
cmpq %r13, %rbx
jne 0x1c225
jmp 0x1c3a5
movq (%r12), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0x5735b(%rip), %rax     # 0x73653
movq %r14, %rdi
movl $0x28, %esi
movl %ebx, %edx
pushq $0x5b2                  # imm = 0x5B2
pushq %rax
callq 0x14486
addq $0x10, %rsp
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %r15, %rdi
callq 0x122c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1aea2
testq %rbx, %rbx
je 0x1c0bb
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x20(%rsp,%r15,8), %rdi
callq 0x2b166
incq %r15
cmpq %r15, %rbx
jne 0x1c339
movq %r14, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x572ec(%rip), %rdx     # 0x73653
movq %r14, %rdi
movl $0x1, %esi
movl $0xbe, %ecx
callq 0x145a4
movq $0x0, 0x8(%rsp)
jmp 0x1c3af
xorl %r15d, %r15d
movq %r15, %rdi
callq 0x2b166
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1aea2
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %rbp
cmpl $0x0, (%r14)
je 0x1c3ba
xorl %r15d, %r15d
jmp 0x1c3d8
movq 0x8(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1ad99
movq %rax, %r15
cmpl $0x0, (%r14)
je 0x1c3e2
movq 0x8(%rsp), %r14
jmp 0x1c317
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1aea2
movq 0x48(%r12), %rax
movb $0x1, 0xe0(%rax)
movq 0x8(%rbp), %rdx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
movq %rbx, %r8
movq %r14, %r9
callq 0x2b4f8
movq %rax, %r14
jmp 0x1c34b