// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]gh_cpp/Src/gh_cpp1.c
// Function: purge_body
static void
purge_body(TS *s, TS *x, MD *m, TS *b)
{	TS *aa;
	ML *ml;
	ARL *ap;	/* actual parameter - could be list */
	int w, original;
	char nm[MAXIN];	/* scratch */

	if (!b) return;

	purge_body(s, x, m, b->nxt);

	switch (b->tok) {
	case ARG:
		if (!saa)
		{	fprintf(stderr, "%s,%d: cannot find argument for %s\n",
				filename, lineno, b->name);
			break;
		}
		original = ((b->nxt
		&&   b->nxt->nxt
		&&   b->nxt->tok == CHAR && b->nxt->val == '#'
		&&   b->nxt->nxt->tok == CHAR && b->nxt->val == '#')
		||  (b->prv
		&&   b->prv->prv
		&&   b->prv->tok == CHAR && b->prv->val == '#'
		&&   b->prv->prv->tok == CHAR && b->prv->val == '#'));

		ap = hunt_param(m, b);

		w = 1;
more1:
		if (original) aa = ap->oal; else aa = ap->al;

		original = 0; /* reuse as counter */
		for ( ; aa; aa = aa->nxt)
		{	if (original) w = aa->space;
			add_inl(aa->tok, aa->val, aa->name, w, 1);
			for (ml = aa->ml; ml; ml = ml->nxt)
				add_tag(lst, ml->m);
			original++;
		}
		if (strcmp(b->name, "__VA_ARGS__") == 0)
		{	ap = ap->nxt;
			if (ap)
			{	add_inl(CHAR, ',', "", 1, 1);
				w = 1;
				goto more1;
		}	}
		break;
	case ARGSTRING:
		if (!saa)
		{	fprintf(stderr, "%s,%d: cannot find arg for %s\n",
				filename, lineno, b->name);
			break;
		}
		ap = hunt_param(m, b);
		strcpy(nm, "\"");
more2:		for (aa = ap->oal; aa; aa = aa->nxt)
			strcat(nm, stringify(aa, ap->oal));

		if (strcmp(b->name, "__VA_ARGS__") == 0)
		{	ap = ap->nxt;
			if (ap)
			{	strcat(nm, ", ");
				goto more2;
		}	}

		strcat(nm, "\"");
		add_inl(NAME, 0, nm, b->space, 0);

		break;
	case PLAINSTRING:
		sprintf(nm, "#%s", b->name);
		add_inl(NAME, 0, nm, b->space, 0);
		break;
	case ECHAR:
	case CHAR:
	default:
		if (debugging)
		{	nested("ADD NORMAL: ");
			tokfull(b, stdout);
			printf(" (space %d)\n", b->space);
		}
		add_inl(b->tok, b->val, b->name, b->space, 1);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
testq %rsi, %rsi
je 0x7b1c
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rsi), %rsi
callq 0x7941
movl (%rbx), %edi
cmpl $0x7, %edi
je 0x7a74
cmpl $0x6, %edi
movq %rbx, -0x30(%rbp)
je 0x79d7
cmpl $0x5, %edi
jne 0x7a92
cmpq $0x0, 0xc9b6(%rip)      # 0x14348
je 0x7c3d
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x7b2e
movq 0x28(%rax), %rcx
testq %rcx, %rcx
je 0x7b2e
cmpl $0x2, (%rax)
jne 0x7b2e
cmpl $0x23, 0x4(%rax)
jne 0x7b2e
cmpl $0x2, (%rcx)
jne 0x7b2e
pushq $0x1
popq %r12
jmp 0x7b58
cmpq $0x0, 0xc969(%rip)      # 0x14348
je 0x7c19
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7cbb
movq %rax, %r14
leaq -0x1040(%rbp), %r15
movw $0x22, (%r15)
leaq 0x619b(%rip), %r12      # 0xdba2
leaq 0x8(%r14), %rbx
movq %rbx, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x7a33
movq (%rbx), %rsi
movq %r13, %rdi
callq 0x7dcb
movq %r15, %rdi
movq %rax, %rsi
callq 0x4190
addq $0x28, %r13
jmp 0x7a0e
movq -0x30(%rbp), %rbx
movq 0x8(%rbx), %rdi
movq %r12, %rsi
callq 0x4140
testl %eax, %eax
jne 0x7af0
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x7af0
movq %r15, %rdi
callq 0x40a0
movw $0x202c, -0x1040(%rbp,%rax) # imm = 0x202C
movb $0x0, -0x103e(%rbp,%rax)
jmp 0x7a07
movq 0x8(%rbx), %rdx
leaq 0x6556(%rip), %rsi      # 0xdfd5
leaq -0x1040(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x41a0
jmp 0x7b09
cmpl $0x0, 0xb847(%rip)      # 0x132e0
je 0x7acc
leaq 0x6537(%rip), %rdi      # 0xdfd9
callq 0x7896
movq 0x9522(%rip), %rax      # 0x10fd0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x5a09
movl 0x10(%rbx), %esi
leaq 0x6523(%rip), %rdi      # 0xdfe6
xorl %eax, %eax
callq 0x40c0
movl (%rbx), %edi
movl 0x4(%rbx), %esi
movq 0x8(%rbx), %rdx
movl 0x10(%rbx), %ecx
pushq $0x1
popq %r8
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7d3c
leaq -0x1040(%rbp), %r14
movq %r14, %rdi
callq 0x40a0
movw $0x22, -0x1040(%rbp,%rax)
movl 0x10(%rbx), %ecx
pushq $0x1
popq %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x7d3c
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rbx), %rcx
xorl %r12d, %r12d
testq %rcx, %rcx
je 0x7b58
movq 0x20(%rcx), %rax
testq %rax, %rax
je 0x7b58
cmpl $0x2, (%rcx)
jne 0x7b58
cmpl $0x23, 0x4(%rcx)
jne 0x7b58
xorl %r12d, %r12d
cmpl $0x2, (%rax)
sete %r12b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7cbb
movq %rax, %rbx
pushq $0x1
popq %r13
xorl %eax, %eax
testl %r12d, %r12d
setne %al
movq %rbx, -0x38(%rbp)
leaq (%rbx,%rax,8), %rbx
xorl %r12d, %r12d
movl %r13d, %r15d
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x7bcf
testl %r12d, %r12d
je 0x7b91
movl 0x10(%rbx), %r15d
movl (%rbx), %edi
movl 0x4(%rbx), %esi
movq 0x8(%rbx), %rdx
movl %r15d, %ecx
movl %r13d, %r8d
callq 0x7d3c
leaq 0x18(%rbx), %r14
movq (%r14), %r14
testq %r14, %r14
je 0x7bc6
movq 0xc7a0(%rip), %rdi      # 0x14358
movq (%r14), %rsi
callq 0x6386
addq $0x8, %r14
jmp 0x7ba9
incl %r12d
addq $0x28, %rbx
jmp 0x7b80
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x5fc4(%rip), %rsi      # 0xdba2
callq 0x4140
testl %eax, %eax
movq -0x38(%rbp), %rbx
jne 0x7b1c
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0x7b1c
pushq $0x2
popq %rdi
pushq $0x2c
popq %rsi
leaq 0x698b(%rip), %rdx      # 0xe594
movl %r13d, %ecx
movl %r13d, %r8d
callq 0x7d3c
jmp 0x7b6a
movq 0x93d8(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movq 0x94e6(%rip), %rdx      # 0x11110
movl 0xa260(%rip), %ecx      # 0x11e90
movq 0x8(%rbx), %r8
leaq 0x637b(%rip), %rsi      # 0xdfb6
jmp 0x7c5f
movq 0x93b4(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
movq 0x94c2(%rip), %rdx      # 0x11110
movl 0xa23c(%rip), %ecx      # 0x11e90
movq 0x8(%rbx), %r8
leaq 0x6333(%rip), %rsi      # 0xdf92
xorl %eax, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4150