// File: /workspace/github_c_makefile_star2_O3/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 0xd720
movq %rsi, %rbx
testq %rsi, %rsi
je 0xd73f
cmpl $0xa01, (%rbx)          # imm = 0xA01
jne 0xd75e
cmpl $0x0, 0x44(%rbx)
jle 0xd6ca
movq 0x48(%rbx), %rax
movq (%rax), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0xd77d
cmpl $0x2, 0x44(%rax)
jne 0xd79c
movq %rdi, %r14
movq 0x48(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r15
movq 0x10(%rcx), %rsi
callq 0xd7bb
movq %r14, %rdi
movl $0x3a, %esi
callq 0x74da
leaq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x7354
movq %r12, %rdi
movq %r15, %rsi
callq 0xc991
movq %r14, %rdi
movq %r12, %rsi
callq 0x769e
movq %r12, %rdi
callq 0x7852
cmpl $0x2, 0x44(%rbx)
jl 0xd6ca
movl $0x1, %r15d
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %r13
movl (%r13), %eax
andl $-0x2, %eax
cmpl $0xa02, %eax            # imm = 0xA02
jne 0xd6d9
movq %r14, %rdi
leaq 0x34a09(%rip), %rsi     # 0x42042
callq 0x73db
movl (%r13), %eax
cmpl $0xa02, %eax            # imm = 0xA02
je 0xd665
cmpl $0xa03, %eax            # imm = 0xA03
jne 0xd701
movq %r14, %rdi
leaq 0x342ce(%rip), %rsi     # 0x4192c
callq 0x73db
jmp 0xd6ba
cmpl $0x2, 0x44(%r13)
jne 0xd6f8
movq 0x48(%r13), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r13
movq 0x10(%rcx), %rsi
movq %r14, %rdi
callq 0xd7bb
movq %r14, %rdi
movl $0x3a, %esi
callq 0x74da
movq %r12, %rdi
callq 0x7354
movq %r12, %rdi
movq %r13, %rsi
callq 0xc991
movq %r14, %rdi
movq %r12, %rsi
callq 0x769e
movq %r12, %rdi
callq 0x7852
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0xd615
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x34269(%rip), %rdi     # 0x41949
leaq 0x33c7d(%rip), %rsi     # 0x41364
leaq 0x34174(%rip), %rcx     # 0x41862
movl $0xc8, %edx
callq 0x30a0
leaq 0x34231(%rip), %rdi     # 0x41930
jmp 0xd708
leaq 0x31c58(%rip), %rdi     # 0x3f360
leaq 0x33c55(%rip), %rsi     # 0x41364
leaq 0x3414c(%rip), %rcx     # 0x41862
movl $0xcc, %edx
callq 0x30a0
leaq 0x32309(%rip), %rdi     # 0x3fa30
leaq 0x33c36(%rip), %rsi     # 0x41364
leaq 0x3412d(%rip), %rcx     # 0x41862
movl $0x9f, %edx
callq 0x30a0
leaq 0x34170(%rip), %rdi     # 0x418b6
leaq 0x33c17(%rip), %rsi     # 0x41364
leaq 0x3410e(%rip), %rcx     # 0x41862
movl $0xa0, %edx
callq 0x30a0
leaq 0x34167(%rip), %rdi     # 0x418cc
leaq 0x33bf8(%rip), %rsi     # 0x41364
leaq 0x340ef(%rip), %rcx     # 0x41862
movl $0xa1, %edx
callq 0x30a0
leaq 0x3417b(%rip), %rdi     # 0x418ff
leaq 0x33bd9(%rip), %rsi     # 0x41364
leaq 0x340d0(%rip), %rcx     # 0x41862
movl $0xa5, %edx
callq 0x30a0
leaq 0x3418d(%rip), %rdi     # 0x41930
leaq 0x33bba(%rip), %rsi     # 0x41364
leaq 0x340b1(%rip), %rcx     # 0x41862
movl $0xc3, %edx
callq 0x30a0