// File: /workspace/github_c_makefile_star2_O0/michaelforney[P]cproc/pp.c
// Function: ctxnext
static struct token *
ctxnext(void)
{
	struct frame *f;
	struct token *t;
	struct macro *m;
	bool space;
	size_t i;

again:
	for (f = arraylast(&ctx, sizeof(*f)); ctx.len; --f, ctx.len -= sizeof(*f)) {
		if (f->ntoken)
			break;
		if (f->macro)
			macrodone(f->macro);
	}
	if (ctx.len == 0)
		return NULL;
	m = f->macro;
	if (m && m->kind == MACROFUNC) {
		/* try to expand macro parameter */
		space = f->token->space;
		switch (f->token->kind) {
		case THASH:
			framenext(f);
			t = framenext(f);
			assert(t);
			i = macroparam(m, t);
			assert(i != -1);
			f = ctxpush(&m->arg[i].str, 1, NULL, space);
			break;
		case TIDENT:
			i = macroparam(m, f->token);
			if (i == -1)
				break;
			framenext(f);
			if (m->arg[i].ntoken == 0)
				goto again;
			f = ctxpush(m->arg[i].token, m->arg[i].ntoken, NULL, space);
			break;
		}
		/* XXX: token concatenation */
	}
	return framenext(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x14759(%rip), %rdi     # 0x220b8
movl $0x18, %esi
callq 0x129d0
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x1474b(%rip)     # 0x220c0
je 0xd9be
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xd984
jmp 0xd9be
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xd99c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xdbc0
jmp 0xd99e
movq -0x10(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x10(%rbp)
movq 0x1470f(%rip), %rax     # 0x220c0
subq $0x18, %rax
movq %rax, 0x14704(%rip)     # 0x220c0
jmp 0xd96d
cmpq $0x0, 0x146fa(%rip)     # 0x220c0
jne 0xd9d5
movq $0x0, -0x8(%rbp)
jmp 0xdb61
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xdb54
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xdb54
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb 0x5(%rax), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x4, %eax
je 0xdad4
jmp 0xda1f
movl -0x34(%rbp), %eax
subl $0x6f, %eax
jne 0xdb52
jmp 0xda2d
movq -0x10(%rbp), %rdi
callq 0xdc20
movq -0x10(%rbp), %rdi
callq 0xdc20
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xda4c
jmp 0xda6b
leaq 0xbec9(%rip), %rdi      # 0x1991c
leaq 0xd0d4(%rip), %rsi      # 0x1ab2e
movl $0xb6, %edx
leaq 0xd0cd(%rip), %rcx      # 0x1ab33
callq 0x30f0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xdc50
movq %rax, -0x30(%rbp)
cmpq $-0x1, -0x30(%rbp)
je 0xda85
jmp 0xdaa4
leaq 0xd0c3(%rip), %rdi      # 0x1ab4f
leaq 0xd09b(%rip), %rsi      # 0x1ab2e
movl $0xb8, %edx
leaq 0xd094(%rip), %rcx      # 0x1ab33
callq 0x30f0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rdi
imulq $0x38, -0x30(%rbp), %rax
addq %rax, %rdi
addq $0x10, %rdi
movb -0x21(%rbp), %al
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %edx
andb $0x1, %al
movzbl %al, %ecx
callq 0xd850
movq %rax, -0x10(%rbp)
jmp 0xdb52
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0xdc50
movq %rax, -0x30(%rbp)
cmpq $-0x1, -0x30(%rbp)
jne 0xdaf1
jmp 0xdb52
movq -0x10(%rbp), %rdi
callq 0xdc20
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x38, -0x30(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0xdb16
jmp 0xd958
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x38, -0x30(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
imulq $0x38, -0x30(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
movb -0x21(%rbp), %al
xorl %ecx, %ecx
movl %ecx, %edx
andb $0x1, %al
movzbl %al, %ecx
callq 0xd850
movq %rax, -0x10(%rbp)
jmp 0xdb54
movq -0x10(%rbp), %rdi
callq 0xdc20
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)