// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x647e
movq %rdi, %r14
leaq 0x873e(%rip), %rbx      # 0xea78
cmpl $0x1, (%r14)
jne 0x6350
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x4140
testl %eax, %eax
je 0x6361
movq %r14, %r15
movq 0x28(%r15), %r14
testq %r14, %r14
jne 0x633a
jmp 0x647e
movq 0x28(%r14), %r13
testq %r13, %r13
je 0x64e3
movl (%r13), %ebx
cmpl $0x2, %ebx
jne 0x63ac
cmpl $0x28, 0x4(%r13)
jne 0x648d
movq 0x28(%r13), %r13
testq %r13, %r13
je 0x64b8
movq 0x28(%r13), %rax
cmpl $0x2, (%rax)
jne 0x64b8
cmpl $0x29, 0x4(%rax)
jne 0x64b8
movl (%r13), %eax
jmp 0x63ae
movl %ebx, %eax
cmpl $0x1, %eax
jne 0x648d
movq 0xdf42(%rip), %r15      # 0x14300
testq %r15, %r15
je 0x63e1
movq 0x28(%r15), %rax
movq %rax, 0xdf32(%rip)      # 0x14300
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
jmp 0x63ee
movl $0x30, %edi
callq 0x4a8a
movq %rax, %r15
movl $0x4, (%r15)
movq 0x8(%r13), %r12
movq %r12, %rdi
callq 0x6a8a
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, 0x4(%r15)
movl 0x10(%r14), %eax
movl %eax, 0x10(%r15)
je 0x642a
movq %r12, %rdi
callq 0x6a8a
movq %r15, %rdi
movq %rax, %rsi
callq 0x6ac2
cmpl $0x2, %ebx
leaq 0x8644(%rip), %rbx      # 0xea78
jne 0x6443
movq 0x28(%r13), %r13
testq %r13, %r13
je 0x64ef
movq 0x20(%r14), %rcx
movq %rcx, 0x20(%r15)
movq 0x28(%r13), %rax
movq %rax, 0x28(%r15)
testq %rcx, %rcx
je 0x6460
movq %r15, 0x28(%rcx)
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x6469
movq %r15, 0x20(%rax)
movq $0x0, 0x28(%r13)
movq %r14, %rdi
callq 0x54de
jmp 0x6353
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0xca00(%rip)      # 0x12e94
je 0x64ac
leaq 0x85d1(%rip), %rdx      # 0xea6e
movl $0x13, %edi
movl $0xe, %esi
callq 0xa2f8
leaq 0x85ea(%rip), %rdi      # 0xea9d
callq 0x4a2c
cmpl $0x0, 0xc9d5(%rip)      # 0x12e94
je 0x64d7
leaq 0x85a6(%rip), %rdx      # 0xea6e
movl $0x13, %edi
movl $0xe, %esi
callq 0xa2f8
leaq 0x85a2(%rip), %rdi      # 0xea80
callq 0x4a2c
leaq 0x8564(%rip), %rdi      # 0xea4e
callq 0x4a2c
leaq 0x85c2(%rip), %rdi      # 0xeab8
callq 0x4a2c