// File: /workspace/github_c_makefile_star2_O3/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 0x14fd5
movq %rsi, %rbx
testq %rsi, %rsi
je 0x14ff4
cmpl $0xa01, (%rbx)          # imm = 0xA01
jne 0x15013
cmpl $0x0, 0x44(%rbx)
jle 0x14f76
movq 0x48(%rbx), %rax
movq (%rax), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0x15032
cmpl $0x2, 0x44(%rax)
jne 0x15051
movq 0x48(%rax), %rax
movq (%rax), %r13
cmpl $0x200, (%r13)          # imm = 0x200
jne 0x1505a
movq %rdi, %r14
movq 0x8(%rax), %r15
leaq -0x40(%rbp), %r12
movq %r12, %rdi
callq 0x7354
movq 0x10(%r13), %rax
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
movq %r12, %rdi
callq 0x7577
movq %r12, %rdi
movq %r15, %rsi
callq 0x14901
movq %r14, %rdi
movq %r12, %rsi
callq 0x769e
movq %r12, %rdi
callq 0x7852
cmpl $0x2, 0x44(%rbx)
jl 0x14f76
movl $0x1, %r15d
leaq 0x2d199(%rip), %r12     # 0x42042
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 0x14f85
movq %r14, %rdi
movq %r12, %rsi
callq 0x73db
movl (%r13), %eax
cmpl $0xa02, %eax            # imm = 0xA02
je 0x14ef9
cmpl $0xa03, %eax            # imm = 0xA03
jne 0x14fad
movq %r14, %rdi
leaq 0x2ca3a(%rip), %rsi     # 0x4192c
callq 0x73db
jmp 0x14f66
cmpl $0x2, 0x44(%r13)
jne 0x14fb6
movq %r12, %rbx
movq 0x48(%r13), %rax
movq (%rax), %r12
cmpl $0x200, (%r12)          # imm = 0x200
jne 0x14fa4
movq 0x8(%rax), %r13
leaq -0x40(%rbp), %rdi
callq 0x7354
movq 0x10(%r12), %rax
movq 0x8(%rax), %rsi
movl 0x4(%rax), %edx
leaq -0x40(%rbp), %r12
movq %r12, %rdi
callq 0x7577
movq %r12, %rdi
movq %r13, %rsi
callq 0x14901
movq %r14, %rdi
movq %r12, %rsi
callq 0x769e
movq %r12, %rdi
callq 0x7852
movq %rbx, %r12
movq -0x30(%rbp), %rbx
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0x14ead
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2c9bd(%rip), %rdi     # 0x41949
leaq 0x2e8f9(%rip), %rsi     # 0x4388c
leaq 0x2eb12(%rip), %rcx     # 0x43aac
movl $0xd5, %edx
callq 0x30a0
leaq 0x2c7b1(%rip), %rdi     # 0x4175c
jmp 0x14fbd
leaq 0x2a3ac(%rip), %rdi     # 0x3f360
jmp 0x14fbd
leaq 0x2c973(%rip), %rdi     # 0x41930
leaq 0x2e8c8(%rip), %rsi     # 0x4388c
leaq 0x2eae1(%rip), %rcx     # 0x43aac
movl $0xd9, %edx
callq 0x30a0
leaq 0x2aa54(%rip), %rdi     # 0x3fa30
leaq 0x2e8a9(%rip), %rsi     # 0x4388c
leaq 0x2eac2(%rip), %rcx     # 0x43aac
movl $0xac, %edx
callq 0x30a0
leaq 0x2eb01(%rip), %rdi     # 0x43afc
leaq 0x2e88a(%rip), %rsi     # 0x4388c
leaq 0x2eaa3(%rip), %rcx     # 0x43aac
movl $0xad, %edx
callq 0x30a0
leaq 0x2df59(%rip), %rdi     # 0x42f73
leaq 0x2e86b(%rip), %rsi     # 0x4388c
leaq 0x2ea84(%rip), %rcx     # 0x43aac
movl $0xae, %edx
callq 0x30a0
leaq 0x2c8c6(%rip), %rdi     # 0x418ff
leaq 0x2e84c(%rip), %rsi     # 0x4388c
leaq 0x2ea65(%rip), %rcx     # 0x43aac
movl $0xb2, %edx
callq 0x30a0
leaq 0x2c8d8(%rip), %rdi     # 0x41930
jmp 0x15061
leaq 0x2c6fb(%rip), %rdi     # 0x4175c
leaq 0x2e824(%rip), %rsi     # 0x4388c
leaq 0x2ea3d(%rip), %rcx     # 0x43aac
movl $0xd0, %edx
callq 0x30a0