// File: /workspace/github_c_makefile_star2_O1/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 0x6492
movq %rdi, %r14
leaq 0x872e(%rip), %rbx      # 0xea7c
cmpl $0x1, (%r14)
jne 0x6364
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x4140
testl %eax, %eax
je 0x6375
movq %r14, %r15
movq 0x28(%r15), %r14
testq %r14, %r14
jne 0x634e
jmp 0x6492
movq 0x28(%r14), %r13
testq %r13, %r13
je 0x64cc
movb $0x1, %bl
cmpl $0x2, (%r13)
jne 0x63b8
cmpl $0x28, 0x4(%r13)
jne 0x63b8
movq 0x28(%r13), %r13
testq %r13, %r13
je 0x64d8
movq 0x28(%r13), %rax
cmpl $0x2, (%rax)
jne 0x64d8
cmpl $0x29, 0x4(%rax)
jne 0x64d8
xorl %ebx, %ebx
cmpl $0x1, (%r13)
jne 0x64a1
movq 0xdf36(%rip), %r15      # 0x14300
testq %r15, %r15
je 0x63ed
movq 0x28(%r15), %rax
movq %rax, 0xdf26(%rip)      # 0x14300
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
jmp 0x63fa
movl $0x30, %edi
callq 0x4afa
movq %rax, %r15
movl $0x4, (%r15)
movq 0x8(%r13), %r12
movq %r12, %rdi
callq 0x6aa1
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, 0x4(%r15)
movl 0x10(%r14), %eax
movl %eax, 0x10(%r15)
je 0x6436
movq %r12, %rdi
callq 0x6aa1
movq %r15, %rdi
movq %rax, %rsi
callq 0x6ad9
testb %bl, %bl
je 0x6443
leaq 0x863b(%rip), %rbx      # 0xea7c
jmp 0x6457
movq 0x28(%r13), %r13
testq %r13, %r13
leaq 0x862b(%rip), %rbx      # 0xea7c
je 0x6503
movq 0x20(%r14), %rax
movq %rax, 0x20(%r15)
movq 0x28(%r13), %rcx
movq %rcx, 0x28(%r15)
testq %rax, %rax
je 0x6470
movq %r15, 0x28(%rax)
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x647d
movq %r15, 0x20(%rax)
movq $0x0, 0x28(%r13)
movq %r14, %rdi
callq 0x550f
jmp 0x6367
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0xc9ec(%rip)      # 0x12e94
je 0x64c0
leaq 0x85c1(%rip), %rdx      # 0xea72
movl $0x13, %edi
movl $0xe, %esi
callq 0xa250
leaq 0x85da(%rip), %rdi      # 0xeaa1
callq 0x4a9c
leaq 0x857f(%rip), %rdi      # 0xea52
callq 0x4a9c
cmpl $0x0, 0xc9b5(%rip)      # 0x12e94
je 0x64f7
leaq 0x858a(%rip), %rdx      # 0xea72
movl $0x13, %edi
movl $0xe, %esi
callq 0xa250
leaq 0x8586(%rip), %rdi      # 0xea84
callq 0x4a9c
leaq 0x85b2(%rip), %rdi      # 0xeabc
callq 0x4a9c