// File: /workspace/github_c_makefile_star2_O1/Ihsoh[P]ilang/compiler/frontend/irgen.c
// Function: ir_func_type_params
static void _ir_func_type_params(
	IRGeneratorContext *ctx,
	ResizableString *rstr,
	ParserASTNode *node_func_type_params
) {
	assert(ctx);
	assert(rstr);
	assert(node_func_type_params);
	assert(node_func_type_params->type == FE_NODE_FUNC_PARAMS);

	if (node_func_type_params->nchilds > 0) {
		ParserASTNode *node_param = node_func_type_params->childs[0];
		assert(node_param->type == FE_NODE_FUNC_PARAMS_ITEM);

		#define _NODE_PARAM	\
			switch (node_param->type) {	\
				case FE_NODE_FUNC_PARAMS_ELLIPSIS_ITEM: {	\
					rstr_append_with_cstr(rstr, "...");	\
					break;	\
				}	\
				case FE_NODE_FUNC_PARAMS_ITEM: {	\
					assert(node_param->nchilds == 2);	\
					ParserASTNode *node_id = node_param->childs[0];	\
					ParserASTNode *node_type = node_param->childs[1];	\
						\
					_ir_identifier_name_tk(ctx, rstr, node_id->token);	\
						\
					rstr_append_with_char(rstr, ':');	\
						\
					ResizableString rstr_type;	\
					rstr_init(&rstr_type);	\
					_ir_type(ctx, &rstr_type, node_type);	\
					rstr_append_with_rstr(rstr, &rstr_type);	\
					rstr_free(&rstr_type);	\
					break;	\
				}	\
				default: {	\
					assert(0);	\
					break;	\
				}	\
			}

		_NODE_PARAM

		for (int i = 1; i < node_func_type_params->nchilds; i++) {
			node_param = node_func_type_params->childs[i];
			assert(node_param->type == FE_NODE_FUNC_PARAMS_ITEM
					|| node_param->type == FE_NODE_FUNC_PARAMS_ELLIPSIS_ITEM);

			rstr_append_with_cstr(rstr, ", ");

			_NODE_PARAM
		}

		#undef	_NODE_PARAM
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0xd99f
movq %rsi, %rbx
testq %rsi, %rsi
je 0xd9be
cmpl $0xa01, (%rbx)          # imm = 0xA01
jne 0xd9dd
cmpl $0x0, 0x44(%rbx)
jle 0xd949
movq 0x48(%rbx), %rax
movq (%rax), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0xd9fc
cmpl $0x2, 0x44(%rax)
jne 0xda1b
movq %rdi, %r14
movq 0x48(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r15
movq 0x10(%rcx), %rsi
callq 0xda3a
movq %r14, %rdi
movl $0x3a, %esi
callq 0x76cb
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x7548
movq %r12, %rdi
movq %r15, %rsi
callq 0xcbf5
movq %r14, %rdi
movq %r12, %rsi
callq 0x788c
movq %r12, %rdi
callq 0x7a38
cmpl $0x2, 0x44(%rbx)
jl 0xd949
movl $0x1, %r15d
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %r13
movl (%r13), %eax
andl $-0x2, %eax
cmpl $0xa02, %eax            # imm = 0xA02
jne 0xd958
movq %r14, %rdi
leaq 0x3573e(%rip), %rsi     # 0x42ff6
callq 0x75cf
movl (%r13), %eax
cmpl $0xa02, %eax            # imm = 0xA02
je 0xd8e4
cmpl $0xa03, %eax            # imm = 0xA03
jne 0xd980
movq %r14, %rdi
leaq 0x35003(%rip), %rsi     # 0x428e0
callq 0x75cf
jmp 0xd939
cmpl $0x2, 0x44(%r13)
jne 0xd977
movq 0x48(%r13), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r13
movq 0x10(%rcx), %rsi
movq %r14, %rdi
callq 0xda3a
movq %r14, %rdi
movl $0x3a, %esi
callq 0x76cb
movq %r12, %rdi
callq 0x7548
movq %r12, %rdi
movq %r13, %rsi
callq 0xcbf5
movq %r14, %rdi
movq %r12, %rsi
callq 0x788c
movq %r12, %rdi
callq 0x7a38
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0xd894
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34f9e(%rip), %rdi     # 0x428fd
leaq 0x349b2(%rip), %rsi     # 0x42318
leaq 0x34ea9(%rip), %rcx     # 0x42816
movl $0xc8, %edx
callq 0x30a0
leaq 0x34f66(%rip), %rdi     # 0x428e4
jmp 0xd987
leaq 0x329fd(%rip), %rdi     # 0x40384
leaq 0x3498a(%rip), %rsi     # 0x42318
leaq 0x34e81(%rip), %rcx     # 0x42816
movl $0xcc, %edx
callq 0x30a0
leaq 0x330aa(%rip), %rdi     # 0x40a50
leaq 0x3496b(%rip), %rsi     # 0x42318
leaq 0x34e62(%rip), %rcx     # 0x42816
movl $0x9f, %edx
callq 0x30a0
leaq 0x34ea5(%rip), %rdi     # 0x4286a
leaq 0x3494c(%rip), %rsi     # 0x42318
leaq 0x34e43(%rip), %rcx     # 0x42816
movl $0xa0, %edx
callq 0x30a0
leaq 0x34e9c(%rip), %rdi     # 0x42880
leaq 0x3492d(%rip), %rsi     # 0x42318
leaq 0x34e24(%rip), %rcx     # 0x42816
movl $0xa1, %edx
callq 0x30a0
leaq 0x34eb0(%rip), %rdi     # 0x428b3
leaq 0x3490e(%rip), %rsi     # 0x42318
leaq 0x34e05(%rip), %rcx     # 0x42816
movl $0xa5, %edx
callq 0x30a0
leaq 0x34ec2(%rip), %rdi     # 0x428e4
leaq 0x348ef(%rip), %rsi     # 0x42318
leaq 0x34de6(%rip), %rcx     # 0x42816
movl $0xc3, %edx
callq 0x30a0