// File: /workspace/github_c_makefile_star2_O0/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
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x1312d
jmp 0x1314c
leaq 0x69422(%rip), %rdi     # 0x7c556
leaq 0x61259(%rip), %rsi     # 0x74394
movl $0x9e, %edx
leaq 0x6174b(%rip), %rcx     # 0x74892
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x13155
jmp 0x13174
leaq 0x5f9b2(%rip), %rdi     # 0x72b0e
leaq 0x61231(%rip), %rsi     # 0x74394
movl $0x9f, %edx
leaq 0x61723(%rip), %rcx     # 0x74892
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x1317d
jmp 0x1319c
leaq 0x61762(%rip), %rdi     # 0x748e6
leaq 0x61209(%rip), %rsi     # 0x74394
movl $0xa0, %edx
leaq 0x616fb(%rip), %rcx     # 0x74892
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0xa01, (%rax)          # imm = 0xA01
jne 0x131aa
jmp 0x131c9
leaq 0x6174b(%rip), %rdi     # 0x748fc
leaq 0x611dc(%rip), %rsi     # 0x74394
movl $0xa1, %edx
leaq 0x616ce(%rip), %rcx     # 0x74892
callq 0x30a0
movq -0x18(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jle 0x13483
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 0x131f4
jmp 0x13213
leaq 0x61734(%rip), %rdi     # 0x7492f
leaq 0x61192(%rip), %rsi     # 0x74394
movl $0xa5, %edx
leaq 0x61684(%rip), %rcx     # 0x74892
callq 0x30a0
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
subl $0xa02, %eax            # imm = 0xA02
je 0x1324a
jmp 0x13225
movl -0x6c(%rbp), %eax
subl $0xa03, %eax            # imm = 0xA03
jne 0x132e9
jmp 0x13235
movq -0x10(%rbp), %rdi
leaq 0x6171c(%rip), %rsi     # 0x7495c
callq 0x8d70
jmp 0x13308
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x13256
jmp 0x13275
leaq 0x61703(%rip), %rdi     # 0x74960
leaq 0x61130(%rip), %rsi     # 0x74394
movl $0xc3, %edx
leaq 0x61622(%rip), %rcx     # 0x74892
callq 0x30a0
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x13490
movq -0x10(%rbp), %rdi
movl $0x3a, %esi
callq 0x8ea0
leaq -0x40(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq -0x40(%rbp), %rsi
callq 0x10ca0
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x9100
leaq -0x40(%rbp), %rdi
callq 0x9310
jmp 0x13308
leaq 0x5f16b(%rip), %rdi     # 0x7245b
leaq 0x6109d(%rip), %rsi     # 0x74394
movl $0xc3, %edx
leaq 0x6158f(%rip), %rcx     # 0x74892
callq 0x30a0
movl $0x1, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x13481
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 0x1334b
movq -0x20(%rbp), %rax
cmpl $0xa03, (%rax)          # imm = 0xA03
jne 0x1334d
jmp 0x1336c
leaq 0x61625(%rip), %rdi     # 0x74979
leaq 0x61039(%rip), %rsi     # 0x74394
movl $0xc8, %edx
leaq 0x6152b(%rip), %rcx     # 0x74892
callq 0x30a0
movq -0x10(%rbp), %rdi
leaq 0x61e52(%rip), %rsi     # 0x751c9
callq 0x8d70
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x70(%rbp)
subl $0xa02, %eax            # imm = 0xA02
je 0x133b3
jmp 0x1338e
movl -0x70(%rbp), %eax
subl $0xa03, %eax            # imm = 0xA03
jne 0x13452
jmp 0x1339e
movq -0x10(%rbp), %rdi
leaq 0x615b3(%rip), %rsi     # 0x7495c
callq 0x8d70
jmp 0x13471
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x133bf
jmp 0x133de
leaq 0x6159a(%rip), %rdi     # 0x74960
leaq 0x60fc7(%rip), %rsi     # 0x74394
movl $0xcc, %edx
leaq 0x614b9(%rip), %rcx     # 0x74892
callq 0x30a0
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x13490
movq -0x10(%rbp), %rdi
movl $0x3a, %esi
callq 0x8ea0
leaq -0x68(%rbp), %rdi
callq 0x8c90
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq -0x68(%rbp), %rsi
callq 0x10ca0
movq -0x10(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x9100
leaq -0x68(%rbp), %rdi
callq 0x9310
jmp 0x13471
leaq 0x5f002(%rip), %rdi     # 0x7245b
leaq 0x60f34(%rip), %rsi     # 0x74394
movl $0xcc, %edx
leaq 0x61426(%rip), %rcx     # 0x74892
callq 0x30a0
jmp 0x13473
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x1330f
jmp 0x13483
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)