// File: /workspace/github_c_makefile_star2_O2/Ihsoh[P]ilang/compiler/frontend/irgen_c.c
// Function: ir_func_params
static void _ir_func_params(
	IRGeneratorCContext *ctx,
	ResizableString *rstr,
	ParserASTNode *node_func_params
) {
	assert(ctx);
	assert(rstr);
	assert(node_func_params);
	assert(node_func_params->type == FE_NODE_FUNC_PARAMS);

	if (node_func_params->nchilds > 0) {
		ParserASTNode *node_param = node_func_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];	\
					assert(node_id->type == FE_NODE_IDENTIFIER);	\
					ParserASTNode *node_t = node_param->childs[1];	\
						\
					ResizableString rstr_func_params_item;	\
					rstr_init(&rstr_func_params_item);	\
					rstr_append_with_raw(&rstr_func_params_item, node_id->token->content, node_id->token->len);	\
						\
					_ir_type(ctx, &rstr_func_params_item, node_t);	\
						\
					rstr_append_with_rstr(rstr, &rstr_func_params_item);	\
					rstr_free(&rstr_func_params_item);	\
					break;	\
				}	\
				default: {	\
					assert(0);	\
					break;	\
				}	\
			}

		_NODE_PARAM

		for (int i = 1; i < node_func_params->nchilds; i++) {
			node_param = node_func_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 0x1423f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1425e
cmpl $0xa01, (%rbx)          # imm = 0xA01
jne 0x1427d
cmpl $0x0, 0x44(%rbx)
jle 0x141e0
movq 0x48(%rbx), %rax
movq (%rax), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0x1429c
cmpl $0x2, 0x44(%rax)
jne 0x142bb
movq 0x48(%rax), %rax
movq (%rax), %r13
cmpl $0x200, (%r13)          # imm = 0x200
jne 0x142c4
movq %rdi, %r15
movq 0x8(%rax), %r12
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x6e1c
movq 0x10(%r13), %rax
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
movq %r14, %rdi
callq 0x700f
movq %r14, %rdi
movq %r12, %rsi
callq 0x13ba1
movq %r15, %rdi
movq %r14, %rsi
callq 0x712e
movq %r14, %rdi
callq 0x72b9
pushq $0x1
popq %r12
leaq 0x2af48(%rip), %r14     # 0x3f052
movq %rbx, -0x30(%rbp)
movslq 0x44(%rbx), %rax
cmpq %rax, %r12
jge 0x141e0
movq 0x48(%rbx), %rax
movq (%rax,%r12,8), %r13
movl (%r13), %eax
andl $-0x2, %eax
cmpl $0xa02, %eax            # imm = 0xA02
jne 0x141ef
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e99
movl (%r13), %eax
cmpl $0xa02, %eax            # imm = 0xA02
je 0x14167
cmpl $0xa03, %eax            # imm = 0xA03
jne 0x1420e
movq %r15, %rdi
leaq 0x2a7dc(%rip), %rsi     # 0x3e93c
callq 0x6e99
jmp 0x141d8
cmpl $0x2, 0x44(%r13)
jne 0x14217
movq %r15, %rbx
movq 0x48(%r13), %rax
movq (%rax), %r15
cmpl $0x200, (%r15)          # imm = 0x200
jne 0x14220
movq 0x8(%rax), %r13
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x6e1c
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
movq %r14, %rdi
callq 0x700f
movq %r14, %rdi
movq %r13, %rsi
callq 0x13ba1
movq %rbx, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x712e
movq %r14, %rdi
callq 0x72b9
movq -0x30(%rbp), %rbx
leaq 0x2ae7a(%rip), %r14     # 0x3f052
incq %r12
jmp 0x1410e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2a763(%rip), %rdi     # 0x3e959
leaq 0x2c6b7(%rip), %rsi     # 0x408b4
leaq 0x2c8d3(%rip), %rcx     # 0x40ad7
movl $0xd5, %edx
callq 0x30a0
leaq 0x2814b(%rip), %rdi     # 0x3c360
jmp 0x14227
leaq 0x2a722(%rip), %rdi     # 0x3e940
jmp 0x14227
leaq 0x2a545(%rip), %rdi     # 0x3e76c
leaq 0x2c686(%rip), %rsi     # 0x408b4
leaq 0x2c8a2(%rip), %rcx     # 0x40ad7
movl $0xd9, %edx
callq 0x30a0
leaq 0x287ea(%rip), %rdi     # 0x3ca30
leaq 0x2c667(%rip), %rsi     # 0x408b4
leaq 0x2c883(%rip), %rcx     # 0x40ad7
movl $0xac, %edx
callq 0x30a0
leaq 0x2c8c2(%rip), %rdi     # 0x40b27
leaq 0x2c648(%rip), %rsi     # 0x408b4
leaq 0x2c864(%rip), %rcx     # 0x40ad7
movl $0xad, %edx
callq 0x30a0
leaq 0x2bcff(%rip), %rdi     # 0x3ff83
leaq 0x2c629(%rip), %rsi     # 0x408b4
leaq 0x2c845(%rip), %rcx     # 0x40ad7
movl $0xae, %edx
callq 0x30a0
leaq 0x2a66c(%rip), %rdi     # 0x3e90f
leaq 0x2c60a(%rip), %rsi     # 0x408b4
leaq 0x2c826(%rip), %rcx     # 0x40ad7
movl $0xb2, %edx
callq 0x30a0
leaq 0x2a67e(%rip), %rdi     # 0x3e940
jmp 0x142cb
leaq 0x2a4a1(%rip), %rdi     # 0x3e76c
leaq 0x2c5e2(%rip), %rsi     # 0x408b4
leaq 0x2c7fe(%rip), %rcx     # 0x40ad7
movl $0xd0, %edx
callq 0x30a0