// File: /workspace/github_c_makefile_star2_O3/markdryan[P]subtilis/common/builtins.c
// Function: subtilis_builtin_ts
subtilis_type_section_t *subtilis_builtin_ts(subtilis_builtin_type_t type,
					     subtilis_error_t *err)
{
	const subtilis_builtin_t *f;
	subtilis_type_t *params;
	size_t i;
	subtilis_type_section_t *ts = NULL;

	f = &subtilis_builtin_list[type];
	params = malloc(sizeof(subtilis_type_t) * f->num_parameters);
	if (!params) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	for (i = 0; i < f->num_parameters; i++)
		params[i].type = SUBTILIS_TYPE_VOID;
	for (i = 0; i < f->num_parameters; i++) {
		subtilis_type_copy(&params[i], &f->arg_types[i], err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}
	ts = subtilis_type_section_new(&f->ret_type, f->num_parameters, params,
				       NULL, err);

cleanup:
	for (i = 0; i < f->num_parameters; i++)
		subtilis_type_free(&params[i]);
	free(params);

	return ts;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movl %edi, %eax
imulq $0x688, %rax, %rbx      # imm = 0x688
leaq 0x6d1ef(%rip), %r14     # 0x9d6b0
movq 0x158(%rbx,%r14), %r12
imulq $0x148, %r12, %rdi      # imm = 0x148
callq 0x121d0
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x30653
addq %rbx, %r14
movq %r14, 0x10(%rsp)
testq %r12, %r12
je 0x30630
leaq 0x3(%r12), %rax
andq $-0x4, %rax
leaq -0x1(%r12), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x430fc(%rip), %xmm1    # 0x73610
movdqa 0x43104(%rip), %xmm2    # 0x73620
movdqa 0x4310c(%rip), %xmm3    # 0x73630
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x4310c(%rip), %xmm5    # 0x73640
movq 0x8(%rsp), %r14
movq %r14, %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 0x30576
movl $0x8, (%rcx)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x3058e
movl $0x8, 0x148(%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 0x305cf
movl $0x8, 0x290(%rcx)
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x305e3
movl $0x8, 0x3d8(%rcx)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x520, %rcx            # imm = 0x520
addq $-0x4, %rax
jne 0x3053c
movq 0x10(%rsp), %rax
leaq 0x160(%rax), %rbp
movl $0x148, %r13d           # imm = 0x148
movq %r12, %rbx
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x2f78a
cmpl $0x0, (%r15)
jne 0x30671
addq %r13, %rbp
addq %r13, %r14
decq %rbx
jne 0x30611
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x2f284
movq %rax, %r15
jmp 0x30679
leaq 0x44bd0(%rip), %rdx     # 0x7522a
movq %r15, %rdi
movl $0x1, %esi
movl $0x3f, %ecx
callq 0x145a4
xorl %r15d, %r15d
jmp 0x3069d
movq 0x8(%rsp), %rbx
xorl %r15d, %r15d
testq %r12, %r12
je 0x30695
movq %rbx, %r14
movq %r14, %rdi
callq 0x2f56e
addq $0x148, %r14            # imm = 0x148
decq %r12
jne 0x30681
movq %rbx, %rdi
callq 0x122c0
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop