// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/builtins_ir.c
// Function: prv_add_args_ci
static subtilis_ir_section_t *prv_add_args_ci(subtilis_parser_t *p,
					      const char *name,
					      size_t arg_count,
					      const subtilis_type_t **ptype,
					      const subtilis_type_t *rtype,
					      size_t *call_index,
					      subtilis_error_t *err)
{
	subtilis_type_section_t *ts;
	subtilis_type_t *params;
	subtilis_ir_section_t *current = NULL;
	size_t j;
	size_t i = 0;

	params = malloc(sizeof(subtilis_type_t) * arg_count);
	if (!params) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	for (; i < arg_count; i++) {
		subtilis_type_init_copy(&params[i], ptype[i], err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}
	ts = subtilis_type_section_new(rtype, arg_count, params, NULL, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	current = subtilis_ir_prog_section_new(
	    p->prog, name, 0, ts, SUBTILIS_BUILTINS_MAX, "builtin", 0,
	    p->eflag_offset, p->error_offset, call_index, err);

cleanup:

	for (j = 0; j < i; j++)
		subtilis_type_free(&params[j]);
	free(params);

	return current;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x68(%rbp)
imulq $0x148, -0x28(%rbp), %rdi # imm = 0x148
callq 0x121b0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x44987
movq 0x10(%rbp), %rdi
movl $0x1, %esi
leaq 0x678e2(%rip), %rdx     # 0xac252
movl $0xc2c, %ecx            # imm = 0xC2C
callq 0x158e0
movq $0x0, -0x10(%rbp)
jmp 0x44aa2
jmp 0x44989
movq -0x68(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x449d5
movq -0x50(%rbp), %rdi
imulq $0x148, -0x68(%rbp), %rax # imm = 0x148
addq %rax, %rdi
movq -0x30(%rbp), %rax
movq -0x68(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x10(%rbp), %rdx
callq 0x3dec0
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x449c5
jmp 0x44a5d
jmp 0x449c7
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x44989
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq 0x10(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
callq 0x3dc00
movq %rax, -0x48(%rbp)
movq 0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x449fd
jmp 0x44a5d
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %ebx
movq -0x18(%rbp), %rax
movl 0xb4(%rax), %r11d
movq -0x40(%rbp), %r10
movq 0x10(%rbp), %rax
xorl %edx, %edx
movl $0x9, %r8d
leaq 0x66143(%rip), %r9      # 0xaab7c
movq $0x0, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x38bd0
movq %rax, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x44a91
movq -0x50(%rbp), %rdi
imulq $0x148, -0x60(%rbp), %rax # imm = 0x148
addq %rax, %rdi
callq 0x3e100
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x44a65
movq -0x50(%rbp), %rdi
callq 0x12290
movq -0x58(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x88, %rsp
popq %rbx
popq %rbp
retq