// File: /workspace/github_c_makefile_star2_O0/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
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x21e4d
jmp 0x21e6c
leaq 0x5a702(%rip), %rdi     # 0x7c556
leaq 0x54f8d(%rip), %rsi     # 0x76de8
movl $0xab, %edx
leaq 0x551dc(%rip), %rcx     # 0x77043
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x21e75
jmp 0x21e94
leaq 0x50c92(%rip), %rdi     # 0x72b0e
leaq 0x54f65(%rip), %rsi     # 0x76de8
movl $0xac, %edx
leaq 0x551b4(%rip), %rcx     # 0x77043
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x21e9d
jmp 0x21ebc
leaq 0x551ef(%rip), %rdi     # 0x77093
leaq 0x54f3d(%rip), %rsi     # 0x76de8
movl $0xad, %edx
leaq 0x5518c(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0xa01, (%rax)          # imm = 0xA01
jne 0x21eca
jmp 0x21ee9
leaq 0x542ae(%rip), %rdi     # 0x7617f
leaq 0x54f10(%rip), %rsi     # 0x76de8
movl $0xae, %edx
leaq 0x5515f(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jle 0x221f7
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
jne 0x21f14
jmp 0x21f33
leaq 0x52a14(%rip), %rdi     # 0x7492f
leaq 0x54ec6(%rip), %rsi     # 0x76de8
movl $0xb2, %edx
leaq 0x55115(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
subl $0xa02, %eax            # imm = 0xA02
je 0x21f6a
jmp 0x21f45
movl -0x6c(%rbp), %eax
subl $0xa03, %eax            # imm = 0xA03
jne 0x22033
jmp 0x21f55
movq -0x10(%rbp), %rdi
leaq 0x529fc(%rip), %rsi     # 0x7495c
callq 0x8d70
jmp 0x22052
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x21f76
jmp 0x21f95
leaq 0x529e3(%rip), %rdi     # 0x74960
leaq 0x54e64(%rip), %rsi     # 0x76de8
movl $0xd0, %edx
leaq 0x550b3(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x21fb2
jmp 0x21fd1
leaq 0x527d3(%rip), %rdi     # 0x7478c
leaq 0x54e28(%rip), %rsi     # 0x76de8
movl $0xd0, %edx
leaq 0x55077(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8c90
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %edx
leaq -0x40(%rbp), %rdi
callq 0x8f90
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq -0x40(%rbp), %rsi
callq 0x216c0
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x9100
leaq -0x40(%rbp), %rdi
callq 0x9310
jmp 0x22052
leaq 0x50421(%rip), %rdi     # 0x7245b
leaq 0x54da7(%rip), %rsi     # 0x76de8
movl $0xd0, %edx
leaq 0x54ff6(%rip), %rcx     # 0x77043
callq 0x30a0
movl $0x1, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x221f5
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0xa02, (%rax)          # imm = 0xA02
je 0x22095
movq -0x20(%rbp), %rax
cmpl $0xa03, (%rax)          # imm = 0xA03
jne 0x22097
jmp 0x220b6
leaq 0x528db(%rip), %rdi     # 0x74979
leaq 0x54d43(%rip), %rsi     # 0x76de8
movl $0xd5, %edx
leaq 0x54f92(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x10(%rbp), %rdi
leaq 0x53108(%rip), %rsi     # 0x751c9
callq 0x8d70
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x70(%rbp)
subl $0xa02, %eax            # imm = 0xA02
je 0x220fd
jmp 0x220d8
movl -0x70(%rbp), %eax
subl $0xa03, %eax            # imm = 0xA03
jne 0x221c6
jmp 0x220e8
movq -0x10(%rbp), %rdi
leaq 0x52869(%rip), %rsi     # 0x7495c
callq 0x8d70
jmp 0x221e5
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x22109
jmp 0x22128
leaq 0x52850(%rip), %rdi     # 0x74960
leaq 0x54cd1(%rip), %rsi     # 0x76de8
movl $0xd9, %edx
leaq 0x54f20(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x22145
jmp 0x22164
leaq 0x52640(%rip), %rdi     # 0x7478c
leaq 0x54c95(%rip), %rsi     # 0x76de8
movl $0xd9, %edx
leaq 0x54ee4(%rip), %rcx     # 0x77043
callq 0x30a0
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x8c90
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %edx
leaq -0x68(%rbp), %rdi
callq 0x8f90
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq -0x68(%rbp), %rsi
callq 0x216c0
movq -0x10(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x9100
leaq -0x68(%rbp), %rdi
callq 0x9310
jmp 0x221e5
leaq 0x5028e(%rip), %rdi     # 0x7245b
leaq 0x54c14(%rip), %rsi     # 0x76de8
movl $0xd9, %edx
leaq 0x54e63(%rip), %rcx     # 0x77043
callq 0x30a0
jmp 0x221e7
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x22059
jmp 0x221f7
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)