// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]gh_cpp/Src/gh_cpp1.c
// Function: do_if_pre
static void
do_if_pre(TS *s)	/* replace occurrences of "defined()" */
{	TS *d, *b, *n;
	int bracketed;

	for (d = s; d; d = d->nxt)
	{	bracketed = 0;
		if (d->tok == NAME
		&&  strcmp(d->name, "defined") == 0)
		{	b = d->nxt;
			if (!b) fatal_error("syntax of defined, missing name");

			if (b->tok == CHAR
			&&  b->val == '(')
			{	b = b->nxt;	/* the name */
				if (!b
				||  b->nxt->tok != CHAR
				||  b->nxt->val != ')')
				{	if (misra_rules) m_rule(19, 14, "malformed defined");
					fatal_error("missing ')' after defined(..");
				}
				bracketed = 1;
			}

			if (b->tok != NAME)
			{	if (misra_rules) m_rule(19, 14, "malformed defined");
				fatal_error("missing name after defined");
			}
			n = new_inl(VAL);
			n->val = (is_macro(b->name))?1:0;
			n->space = d->space;

			if (n->val) add_tag(n, is_macro(b->name));

			if (bracketed)
			{	b = b->nxt;	/* skip to ')' */
				if (!b) fatal_error("syntax of defined, missing ')'");
			}
			n->prv = d->prv;
			n->nxt = b->nxt;

			if (n->prv)
				n->prv->nxt = n;
			if (n->nxt)
				n->nxt->prv = n;

			b->nxt = (TS *) 0;
			release_all(d);

			d = n;
	}	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6c3f
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x6c2c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0xa215(%rip), %rsi      # 0x10c67
callq 0x4100
cmpl $0x0, %eax
jne 0x6c2c
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6a7f
leaq 0xa1c3(%rip), %rdi      # 0x10c3d
callq 0x42b0
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x6af2
movq -0x18(%rbp), %rax
cmpl $0x28, 0x4(%rax)
jne 0x6af2
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x6ac0
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x2, (%rax)
jne 0x6ac0
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x29, 0x4(%rax)
je 0x6aeb
cmpl $0x0, 0xe4cd(%rip)      # 0x14f94
je 0x6adf
movl $0x13, %edi
movl $0xe, %esi
leaq 0xa183(%rip), %rdx      # 0x10c5d
callq 0xca50
leaq 0xa189(%rip), %rdi      # 0x10c6f
callq 0x42b0
movl $0x1, -0x24(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
je 0x6b26
cmpl $0x0, 0xe492(%rip)      # 0x14f94
je 0x6b1a
movl $0x13, %edi
movl $0xe, %esi
leaq 0xa148(%rip), %rdx      # 0x10c5d
callq 0xca50
leaq 0xa16b(%rip), %rdi      # 0x10c8c
callq 0x42b0
movl $0x4, %edi
callq 0x5eb0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x7130
movq %rax, %rdx
xorl %ecx, %ecx
movl $0x1, %eax
cmpq $0x0, %rdx
cmovnel %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x6b92
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x7130
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x7190
cmpl $0x0, -0x24(%rbp)
je 0x6bb9
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6bb7
leaq 0xa0f5(%rip), %rdi      # 0x10ca7
callq 0x42b0
jmp 0x6bb9
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x6bf4
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x6c0f
movq -0x20(%rbp), %rcx
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rdi
callq 0x4c60
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x6c2e
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x6a24
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)