// File: /workspace/github_c_makefile_star2_O2/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 0xcaed
movq %rsi, %rbx
testq %rsi, %rsi
je 0xcb0c
cmpl $0xa01, (%rbx)          # imm = 0xA01
jne 0xcb2b
cmpl $0x0, 0x44(%rbx)
jle 0xca97
movq 0x48(%rbx), %rax
movq (%rax), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0xcb4a
cmpl $0x2, 0x44(%rax)
jne 0xcb69
movq %rdi, %r14
movq 0x48(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r15
movq 0x10(%rcx), %rsi
callq 0xcb88
pushq $0x3a
popq %rsi
movq %r14, %rdi
callq 0x6f81
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x6e1c
movq %r12, %rdi
movq %r15, %rsi
callq 0xbd8f
movq %r14, %rdi
movq %r12, %rsi
callq 0x712e
movq %r12, %rdi
callq 0x72b9
pushq $0x1
popq %r13
movslq 0x44(%rbx), %rax
cmpq %rax, %r13
jge 0xca97
movq 0x48(%rbx), %rax
movq (%rax,%r13,8), %r15
movl (%r15), %eax
andl $-0x2, %eax
cmpl $0xa02, %eax            # imm = 0xA02
jne 0xcaa6
movq %r14, %rdi
leaq 0x32641(%rip), %rsi     # 0x3f052
callq 0x6e99
movl (%r15), %eax
cmpl $0xa02, %eax            # imm = 0xA02
je 0xca3c
cmpl $0xa03, %eax            # imm = 0xA03
jne 0xcac5
movq %r14, %rdi
leaq 0x31f07(%rip), %rsi     # 0x3e93c
callq 0x6e99
jmp 0xca8f
cmpl $0x2, 0x44(%r15)
jne 0xcace
movq 0x48(%r15), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r15
movq 0x10(%rcx), %rsi
movq %r14, %rdi
callq 0xcb88
movq %r14, %rdi
pushq $0x3a
popq %rsi
callq 0x6f81
movq %r12, %rdi
callq 0x6e1c
movq %r12, %rdi
movq %r15, %rsi
callq 0xbd8f
movq %r14, %rdi
movq %r12, %rsi
callq 0x712e
movq %r12, %rdi
callq 0x72b9
incq %r13
jmp 0xc9e1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31eac(%rip), %rdi     # 0x3e959
leaq 0x318c0(%rip), %rsi     # 0x3e374
leaq 0x31db7(%rip), %rcx     # 0x3e872
movl $0xc8, %edx
callq 0x30a0
leaq 0x2f894(%rip), %rdi     # 0x3c360
jmp 0xcad5
leaq 0x31e6b(%rip), %rdi     # 0x3e940
leaq 0x31898(%rip), %rsi     # 0x3e374
leaq 0x31d8f(%rip), %rcx     # 0x3e872
movl $0xcc, %edx
callq 0x30a0
leaq 0x2ff3c(%rip), %rdi     # 0x3ca30
leaq 0x31879(%rip), %rsi     # 0x3e374
leaq 0x31d70(%rip), %rcx     # 0x3e872
movl $0x9f, %edx
callq 0x30a0
leaq 0x31db3(%rip), %rdi     # 0x3e8c6
leaq 0x3185a(%rip), %rsi     # 0x3e374
leaq 0x31d51(%rip), %rcx     # 0x3e872
movl $0xa0, %edx
callq 0x30a0
leaq 0x31daa(%rip), %rdi     # 0x3e8dc
leaq 0x3183b(%rip), %rsi     # 0x3e374
leaq 0x31d32(%rip), %rcx     # 0x3e872
movl $0xa1, %edx
callq 0x30a0
leaq 0x31dbe(%rip), %rdi     # 0x3e90f
leaq 0x3181c(%rip), %rsi     # 0x3e374
leaq 0x31d13(%rip), %rcx     # 0x3e872
movl $0xa5, %edx
callq 0x30a0
leaq 0x31dd0(%rip), %rdi     # 0x3e940
leaq 0x317fd(%rip), %rsi     # 0x3e374
leaq 0x31cf4(%rip), %rcx     # 0x3e872
movl $0xc3, %edx
callq 0x30a0