// File: /workspace/github_c_makefile_star2_O1/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 0x15278
movq %rsi, %rbx
testq %rsi, %rsi
je 0x15297
cmpl $0xa01, (%rbx)          # imm = 0xA01
jne 0x152b6
cmpl $0x0, 0x44(%rbx)
jle 0x15219
movq 0x48(%rbx), %rax
movq (%rax), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0x152d5
cmpl $0x2, 0x44(%rax)
jne 0x152f4
movq 0x48(%rax), %rax
movq (%rax), %r13
cmpl $0x200, (%r13)          # imm = 0x200
jne 0x152fd
movq %rdi, %r14
movq 0x8(%rax), %r15
leaq -0x40(%rbp), %r12
movq %r12, %rdi
callq 0x7548
movq 0x10(%r13), %rax
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
movq %r12, %rdi
callq 0x7768
movq %r12, %rdi
movq %r15, %rsi
callq 0x14ba1
movq %r14, %rdi
movq %r12, %rsi
callq 0x788c
movq %r12, %rdi
callq 0x7a38
cmpl $0x2, 0x44(%rbx)
jl 0x15219
movl $0x1, %r15d
leaq 0x2deaa(%rip), %r12     # 0x42ff6
movq %rbx, -0x30(%rbp)
movq 0x48(%rbx), %rax
movq (%rax,%r15,8), %r13
movl (%r13), %eax
andl $-0x2, %eax
cmpl $0xa02, %eax            # imm = 0xA02
jne 0x15228
movq %r14, %rdi
movq %r12, %rsi
callq 0x75cf
movl (%r13), %eax
cmpl $0xa02, %eax            # imm = 0xA02
je 0x1519c
cmpl $0xa03, %eax            # imm = 0xA03
jne 0x15250
movq %r14, %rdi
leaq 0x2d74b(%rip), %rsi     # 0x428e0
callq 0x75cf
jmp 0x15209
cmpl $0x2, 0x44(%r13)
jne 0x15259
movq %r12, %rbx
movq 0x48(%r13), %rax
movq (%rax), %r12
cmpl $0x200, (%r12)          # imm = 0x200
jne 0x15247
movq 0x8(%rax), %r13
leaq -0x40(%rbp), %rdi
callq 0x7548
movq 0x10(%r12), %rax
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
leaq -0x40(%rbp), %r12
movq %r12, %rdi
callq 0x7768
movq %r12, %rdi
movq %r13, %rsi
callq 0x14ba1
movq %r14, %rdi
movq %r12, %rsi
callq 0x788c
movq %r12, %rdi
callq 0x7a38
movq %rbx, %r12
movq -0x30(%rbp), %rbx
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0x15150
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2d6ce(%rip), %rdi     # 0x428fd
leaq 0x2f586(%rip), %rsi     # 0x447bc
leaq 0x2f7a2(%rip), %rcx     # 0x449df
movl $0xd5, %edx
callq 0x30a0
leaq 0x2d4c2(%rip), %rdi     # 0x42710
jmp 0x15260
leaq 0x2b12d(%rip), %rdi     # 0x40384
jmp 0x15260
leaq 0x2d684(%rip), %rdi     # 0x428e4
leaq 0x2f555(%rip), %rsi     # 0x447bc
leaq 0x2f771(%rip), %rcx     # 0x449df
movl $0xd9, %edx
callq 0x30a0
leaq 0x2b7d1(%rip), %rdi     # 0x40a50
leaq 0x2f536(%rip), %rsi     # 0x447bc
leaq 0x2f752(%rip), %rcx     # 0x449df
movl $0xac, %edx
callq 0x30a0
leaq 0x2f791(%rip), %rdi     # 0x44a2f
leaq 0x2f517(%rip), %rsi     # 0x447bc
leaq 0x2f733(%rip), %rcx     # 0x449df
movl $0xad, %edx
callq 0x30a0
leaq 0x2ec6a(%rip), %rdi     # 0x43f27
leaq 0x2f4f8(%rip), %rsi     # 0x447bc
leaq 0x2f714(%rip), %rcx     # 0x449df
movl $0xae, %edx
callq 0x30a0
leaq 0x2d5d7(%rip), %rdi     # 0x428b3
leaq 0x2f4d9(%rip), %rsi     # 0x447bc
leaq 0x2f6f5(%rip), %rcx     # 0x449df
movl $0xb2, %edx
callq 0x30a0
leaq 0x2d5e9(%rip), %rdi     # 0x428e4
jmp 0x15304
leaq 0x2d40c(%rip), %rdi     # 0x42710
leaq 0x2f4b1(%rip), %rsi     # 0x447bc
leaq 0x2f6cd(%rip), %rcx     # 0x449df
movl $0xd0, %edx
callq 0x30a0