// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/6/simp.c
// Function: vatypeinfo
static Node *
vatypeinfo(Simp *s, Node *n)
{
	Node *ti, *tp, *td, *tn;
	Type *ft, *vt, **st;
	size_t nst, i;
	char buf[1024];

	st = NULL;
	nst = 0;
	ft = exprtype(n->expr.args[0]);
	/* The structure of ft->sub:
	 *   [return, normal, args, ...]
	 *
	 * The structure of n->expr.sub:
	 *    [fn, normal, args, , variadic, args]
	 *
	 * We want to start at variadic, so we want
	 * to count from ft->nsub - 1, up to n->expr.nsub.
	 */
	for (i = ft->nsub - 1; i < n->expr.nargs; i++) {
		lappend(&st, &nst, exprtype(n->expr.args[i]));
	}
	vt = mktytuple(n->loc, st, nst);
	tagreflect(vt);

	/* make the decl */
	tn = mkname(Zloc, tydescid(buf, sizeof buf, vt));
	td = mkdecl(Zloc, tn, mktype(n->loc, Tybyte));
	td->decl.isglobl = 1;
	td->decl.isconst = 1;
	td->decl.ishidden = 1;

	/* and the var */
	ti = mkexpr(Zloc, Ovar, tn, NULL);
	ti->expr.type = td->decl.type;
	ti->expr.did = td->decl.did;

	/* and the pointer */
	tp = mkexpr(Zloc, Oaddr, ti, NULL);
	tp->expr.type = mktyptr(n->loc, td->decl.type);

	htput(s->globls, td, asmname(td));
	return tp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rdi
callq 0x30340
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x70(%rax), %rax
subq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x1ab98
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x30340
movq %rax, %rdx
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x48290
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x1ab57
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq (%rax), %rdi
callq 0x37490
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x1e1b0
movl $0xffffffff, -0x468(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x464(%rbp)
leaq -0x460(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x7b70
movq %rax, %rsi
movq -0x468(%rbp), %rdi
callq 0x2f540
movq %rax, -0x30(%rbp)
movl $0xffffffff, -0x470(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x46c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x498(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x9, %esi
callq 0x36c10
movq -0x498(%rbp), %rsi
movq %rax, %rdx
movq -0x470(%rbp), %rdi
callq 0x2ff20
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb $0x1, 0x71(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x72(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x76(%rax)
movl $0xffffffff, -0x478(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x474(%rbp)
movq -0x30(%rbp), %rdx
movq -0x478(%rbp), %rdi
movl $0x33, %esi
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x2f400
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
movl $0xffffffff, -0x480(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x47c(%rbp)
movq -0x18(%rbp), %rdx
movq -0x480(%rbp), %rdi
movl $0x12, %esi
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x2f400
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x28(%rcx), %rsi
movq (%rax), %rdi
callq 0x37430
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x490(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x488(%rbp)
movq -0x28(%rbp), %rdi
callq 0x7720
movq -0x490(%rbp), %rdi
movq -0x488(%rbp), %rsi
movq %rax, %rdx
callq 0x49100
movq -0x20(%rbp), %rax
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
nopw %cs:(%rax,%rax)