// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/frontend/builtins_ir.c
// Function: subtilis_builtin_ir_call_deref_array_recs_gen
void subtilis_builtin_ir_call_deref_array_recs_gen(subtilis_parser_t *p,
						   size_t el_start_reg,
						   size_t el_size_reg,
						   size_t el_destruct_reg,
						   subtilis_error_t *err)
{
	subtilis_ir_section_t *fn;
	const subtilis_type_t *ptype[3];
	subtilis_ir_arg_t *args;
	char *name_copy;
	const char *name = "_deref_array_recs";

	ptype[0] = &subtilis_type_integer;
	ptype[1] = &subtilis_type_integer;
	ptype[2] = &subtilis_type_integer;

	fn = prv_add_args(p, name, 3, ptype, &subtilis_type_void, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		if (err->type != SUBTILIS_ERROR_ALREADY_DEFINED)
			return;
		subtilis_error_init(err);
	} else {
		prv_builtins_ir_deref_array_recs_gen(p, fn, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return;
	}

	name_copy = malloc(strlen(name) + 1);
	if (!name_copy) {
		subtilis_error_set_oom(err);
		return;
	}
	strcpy(name_copy, name);

	args = malloc(sizeof(*args) * 3);
	if (!args) {
		free(name_copy);
		subtilis_error_set_oom(err);
		return;
	}

	args[0].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[0].reg = el_start_reg;
	args[1].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[1].reg = el_size_reg;
	args[2].type = SUBTILIS_IR_REG_TYPE_INTEGER;
	args[2].reg = el_destruct_reg;

	(void)subtilis_exp_add_call(p, name_copy, SUBTILIS_BUILTINS_MAX, NULL,
				    args, &subtilis_type_void, 3, false, err);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
leaq 0x41aa1(%rip), %rax     # 0x74918
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movq %rax, 0x10(%rcx)
subq $0x8, %rsp
leaq 0x423c5(%rip), %rsi     # 0x75257
leaq 0x41e57(%rip), %r8      # 0x74cf0
movl $0x3, %edx
xorl %r9d, %r9d
pushq %rbx
callq 0x34176
addq $0x10, %rsp
movl (%rbx), %ecx
testl %ecx, %ecx
je 0x32f47
cmpl $0x20, %ecx
jne 0x33123
movq %rbx, %rdi
callq 0x143b4
movl $0x12, %edi
callq 0x121d0
testq %rax, %rax
je 0x33132
movq %rax, %rbp
movups 0x42374(%rip), %xmm0    # 0x75257
movups %xmm0, (%rax)
movw $0x73, 0x10(%rax)
movl $0x48, %edi
callq 0x121d0
testq %rax, %rax
je 0x33148
xorl %r10d, %r10d
movl %r10d, (%rax)
movq %r13, 0x8(%rax)
movl %r10d, 0x18(%rax)
movq %r12, 0x20(%rax)
movl %r10d, 0x30(%rax)
movq %r15, 0x38(%rax)
subq $0x8, %rsp
leaq 0x41dcc(%rip), %r9      # 0x74cf0
movq %r14, %rdi
movq %rbp, %rsi
movl $0x9, %edx
xorl %ecx, %ecx
movq %rax, %r8
pushq %rbx
pushq %r10
pushq $0x3
callq 0x2b1aa
addq $0x68, %rsp
jmp 0x33127
movq %r15, 0x28(%rsp)
movq 0x48(%r14), %rcx
movq %rcx, 0x20(%rsp)
movq %rax, 0x48(%r14)
movq %rax, %rdi
callq 0x2cc99
movq %rax, %rbp
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, 0x10(%rsp)
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, 0x8(%rsp)
movq 0x48(%r14), %rdi
callq 0x2cc99
movq %rax, 0x18(%rsp)
movq 0x48(%r14), %rdi
movl $0x4, %edx
movl $0x12, %esi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3311a
movq %rax, %r15
movq 0x48(%r14), %rdi
movl $0x4, %edx
movl $0x8, %ecx
movl $0x12, %esi
movq %rbx, %r8
callq 0x2bc8f
movq %rax, (%rsp)
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movl $0x43, %esi
movq %r15, %rdx
movq %rbp, %rcx
movq 0x18(%rsp), %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movl $0x7a, %esi
movq (%rsp), %rdx
movq %rbx, %rcx
callq 0x2be09
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movl $0x1, %ecx
movl $0x2d, %esi
movq %rax, %rdx
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movl $0x43, %esi
movq %rax, %rdx
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r8
movq %rbx, %r9
callq 0x2bd42
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movl $0x4, %edx
movl $0xc, %ecx
movl $0x12, %esi
movq %rbx, %r8
callq 0x2bc8f
cmpl $0x0, (%rbx)
jne 0x3311a
movl $0x5, %ecx
movl $0x6, %r8d
movq %r14, %rdi
movq (%rsp), %rsi
movq %rax, %rdx
movq %rbx, %r9
callq 0x44584
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
jne 0x3311a
movq %r14, %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x4d56b
cmpl $0x0, (%rbx)
jne 0x3311a
movq 0x48(%r14), %rdi
movq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x2cca6
cmpl $0x0, (%rbx)
je 0x33177
movq 0x20(%rsp), %rax
movq %rax, 0x48(%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42130(%rip), %rdx     # 0x75269
movq %rbx, %rdi
movl $0x1, %esi
movl $0x969, %ecx            # imm = 0x969
jmp 0x33164
movq %rbp, %rdi
callq 0x122c0
leaq 0x42112(%rip), %rdx     # 0x75269
movq %rbx, %rdi
movl $0x1, %esi
movl $0x971, %ecx            # imm = 0x971
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x145a4
movq 0x48(%r14), %rdi
movl $0x46, %esi
movq %rbx, %rdx
callq 0x2be37
cmpl $0x0, (%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%r14)
movq 0x28(%rsp), %r15
jne 0x33123
jmp 0x32ec6