// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_type.c
// Function: parse_parameter_type_list
static void
parse_parameter_type_list(const struct Token **ptr_tokvec,
                          struct Vector /*<struct TypeNode>*/ *ptr_vec)
{
	assert((*ptr_tokvec)[-1].kind == LEFT_PAREN);
	const struct Token *tokvec = *ptr_tokvec;
	struct Vector vec = *ptr_vec;
	{

		if (tokvec[0].kind == RIGHT_PAREN) { /* NO INFO */
			struct TypeNode f;
			f.type_category = FN;
			f.param_infos_validity = INVALID;
			f.param_infos = init_vector();
			struct TypeNode *ptr = calloc(1, sizeof(struct TypeNode));
			*ptr = f;
			push_vector(&vec, ptr);
		} else if (tokvec[0].kind == RES_VOID &&
		           tokvec[1].kind == RIGHT_PAREN) { /* EXPLICITLY EMPTY */
			tokvec += 1;
			struct TypeNode f;
			f.type_category = FN;
			f.param_infos_validity = VALID;
			f.param_infos = init_vector();
			struct TypeNode *ptr = calloc(1, sizeof(struct TypeNode));
			*ptr = f;
			push_vector(&vec, ptr);
		} else if (can_start_a_type(tokvec)) {
			struct TypeNode f;
			f.type_category = FN;
			f.param_infos_validity = VALID;
			f.param_infos = init_vector();

			push_vector(&f.param_infos, parse_parameter_declaration(&tokvec));

			while (1) {
				enum TokenKind kind = tokvec[0].kind;
				if (kind != OP_COMMA) {
					break;
				}
				++tokvec;

				if (tokvec[0].kind == TRIPLE_DOT) {
					f.param_infos_validity = VA_ARGS;
					++tokvec;
					break;
				} else {
					push_vector(&f.param_infos,
					            parse_parameter_declaration(&tokvec));
				}
			}

			struct TypeNode *ptr = calloc(1, sizeof(struct TypeNode));
			*ptr = f;
			push_vector(&vec, ptr);
		} else {
			error_unexpected_token(tokvec,
			                       "while parsing function parameter list");
		}
	}
	*ptr_tokvec = tokvec;
	*ptr_vec = vec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpl $0x6, -0x20(%rax)
sete %al
andb $0x1, %al
movzbl %al, %edi
movb $0x0, %al
callq 0x1260
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x7, (%rax)
jne 0xc875
movl $0x3, -0x78(%rbp)
movl $0x0, -0x50(%rbp)
callq 0x61d0
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x1, %edi
movl $0x50, %esi
callq 0x10b0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movl $0x50, %edx
callq 0x10e0
movq -0x90(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x62c0
jmp 0xca65
movq -0x18(%rbp), %rax
cmpl $0x3e, (%rax)
jne 0xc922
movq -0x18(%rbp), %rax
cmpl $0x7, 0x20(%rax)
jne 0xc922
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movl $0x3, -0xe0(%rbp)
movl $0x1, -0xb8(%rbp)
callq 0x61d0
movq %rax, -0xf0(%rbp)
movq %rdx, -0xe8(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x1, %edi
movl $0x50, %esi
callq 0x10b0
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
movl $0x50, %edx
callq 0x10e0
movq -0xf8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x62c0
jmp 0xca63
movq -0x18(%rbp), %rdi
callq 0xc270
cmpl $0x0, %eax
je 0xca51
movl $0x3, -0x148(%rbp)
movl $0x1, -0x120(%rbp)
callq 0x61d0
movq %rax, -0x158(%rbp)
movq %rdx, -0x150(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x148(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x170(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xb960
movq -0x170(%rbp), %rdi
movq %rax, %rsi
callq 0x62c0
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x15c(%rbp)
cmpl $0xa, -0x15c(%rbp)
je 0xc9b8
jmp 0xca11
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x48, (%rax)
jne 0xc9e5
movl $0x2, -0x120(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
jmp 0xca11
leaq -0x148(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x178(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xb960
movq -0x178(%rbp), %rdi
movq %rax, %rsi
callq 0x62c0
jmp 0xc9a1
movl $0x1, %edi
movl $0x50, %esi
callq 0x10b0
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movl $0x50, %edx
callq 0x10e0
movq -0x168(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x62c0
jmp 0xca61
movq -0x18(%rbp), %rdi
leaq 0x8e0a(%rip), %rsi      # 0x15866
callq 0xb070
jmp 0xca63
jmp 0xca65
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopl (%rax)