// File: /workspace/github_c_makefile_star2_O3/nimble-code[P]gh_cpp/Src/gh_cpp1.c
// Function: do_define
static void
do_define(TS *s)
{	int i, j = 0;

	if (s->tok != NAME)
		fatal_error("expect name after #define");

	if (misra_rules
	&&  BlockDepth > 0)
		m_rule(19, 5, "#define within block scope");

	newmacro(s->name);

	s = s->nxt;

	sfa = (ARGS *) 0;
	if (s && s->tok == CHAR && s->val == '(' && s->space == 0)
		s = do_params(s->nxt);	/* puts formal par list in sfa */

	ca = sfa;	/* this is where scan_args and closemacro look for it */
	for (j = 0; s; j++, s?s = s->nxt:s)	/* body of define */
	{	white = (j>0)?s->space:0;
		switch (s->tok) {
		case NAME:
			i = scan_args(s->name);
			addbody(i >= 0 ? ARG: NAME, 0);
			cb->name = s->name;
			cb->val = (i >= 0)? i : 0;

			if (misra_rules && i > 0
			&&  not_braced(s))
				m_rule(19, 10, "formal param not enclosed in ()");

			break;
		case VAL:
			addbody(VAL, s->val);
			break;
		case ECHAR:
			addbody(ECHAR, s->val);
			break;
		case CHAR:
			if (s->val == '#')
			{	do_stringarg(s->nxt, s->space);
				s = s->nxt;
			} else
				addbody(CHAR, s->val);
			break;
		default:
			fatal_error("cannot happen");
	}	}

	white = 0;
	closemacro();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, (%rdi)
jne 0x6980
movq %rdi, %rbx
cmpl $0x0, 0xc8e1(%rip)      # 0x12e94
je 0x65d4
cmpl $0x0, 0xdd54(%rip)      # 0x14310
jle 0x65d4
leaq 0x856a(%rip), %rdx      # 0xeb2f
movl $0x13, %edi
movl $0x5, %esi
callq 0xa2f8
movq 0x8(%rbx), %rdi
callq 0x6b20
movq 0x28(%rbx), %r15
movq $0x0, 0xdd34(%rip) # 0x14320
testq %r15, %r15
je 0x6864
cmpl $0x2, (%r15)
jne 0x660d
cmpl $0x28, 0x4(%r15)
jne 0x660d
cmpl $0x0, 0x10(%r15)
je 0x688c
movq $0x0, 0xdd10(%rip) # 0x14328
xorl %r12d, %r12d
leaq 0x4aee(%rip), %r13      # 0xb110
xorl %ebx, %ebx
movl $0x0, %eax
subl $0x1, %ebx
jb 0x6632
movl 0x10(%r15), %eax
movl %eax, 0xc860(%rip)      # 0x12e98
movl (%r15), %eax
decl %eax
cmpl $0x3, %eax
ja 0x6968
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0x8(%r15), %rdi
callq 0x6b9c
movl %eax, %r14d
xorl %eax, %eax
testl %r14d, %r14d
setns %al
leal 0x1(,%rax,4), %edi
xorl %esi, %esi
callq 0x6c20
movq 0x8(%r15), %rax
movq 0xdcb3(%rip), %rcx      # 0x14330
movq %rax, 0x8(%rcx)
testl %r14d, %r14d
cmovsl %r12d, %r14d
movl %r14d, 0x4(%rcx)
jle 0x67b2
cmpl $0x0, 0xc7fb(%rip)      # 0x12e94
je 0x67b2
movq 0x20(%r15), %rcx
testq %rcx, %rcx
je 0x66f1
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x66f1
cmpl $0x2, (%rcx)
jne 0x66f1
movl 0x4(%rcx), %ecx
cmpl $0x28, %ecx
je 0x66c3
cmpl $0x23, %ecx
jne 0x66f1
cmpl $0x2, (%rax)
jne 0x66f1
movl 0x4(%rax), %ecx
cmpl $0x29, %ecx
je 0x67b2
cmpl $0x23, %ecx
jne 0x66f1
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x66f1
cmpl $0x2, (%rax)
jne 0x66f1
cmpl $0x23, 0x4(%rax)
je 0x67b2
movl $0x13, %edi
movl $0xa, %esi
leaq 0x8448(%rip), %rdx      # 0xeb4a
callq 0xa2f8
jmp 0x67b2
movl 0x4(%r15), %esi
movl $0x3, %edi
jmp 0x67ad
movl 0x4(%r15), %esi
movl $0x4, %edi
jmp 0x67ad
movl 0x4(%r15), %esi
cmpl $0x23, %esi
jne 0x67a8
movq 0x28(%r15), %r12
testq %r12, %r12
je 0x67c4
movl 0x10(%r15), %eax
movl %eax, 0xc750(%rip)      # 0x12e98
movl (%r12), %eax
decl %eax
cmpl $0x3, %eax
ja 0x6968
leaq 0x49c2(%rip), %rcx      # 0xb120
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r12), %rdi
callq 0x6b9c
movl %eax, %r14d
xorl %edi, %edi
testl %eax, %eax
setns %dil
movl $0x0, %eax
cmovsl %eax, %r14d
xorl $0x7, %edi
xorl %esi, %esi
callq 0x6c20
movq 0x8(%r12), %rax
movq 0xdb95(%rip), %rcx      # 0x14330
movq %rax, 0x8(%rcx)
movl %r14d, 0x4(%rcx)
jmp 0x6848
movl $0x2, %edi
callq 0x6c20
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x6624
jmp 0x686f
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c20
jmp 0x6852
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c20
movl $0x0, 0xc6aa(%rip)      # 0x12e98
movl 0x4(%r12), %esi
movl $0x3, %edi
jmp 0x6843
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c20
movl $0x0, 0xc685(%rip)      # 0x12e98
movl 0x4(%r12), %esi
movl $0x4, %edi
jmp 0x6843
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c20
movl 0x10(%r12), %eax
movl %eax, 0xc65f(%rip)      # 0x12e98
movl 0x4(%r12), %esi
movl $0x2, %edi
callq 0x6c20
movl $0x0, 0xc646(%rip)      # 0x12e98
xorl %r12d, %r12d
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x67b2
jmp 0x686f
movq $0x0, 0xdab9(%rip) # 0x14328
movl $0x0, 0xc61f(%rip)      # 0x12e98
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6c8c
movq 0x28(%r15), %r15
testq %r15, %r15
je 0x698c
movl (%r15), %eax
cmpl $0x1, %eax
je 0x68bc
cmpl $0x2, %eax
jne 0x693e
cmpl $0x29, 0x4(%r15)
jne 0x693e
xorl %eax, %eax
jmp 0x694f
movq 0xda65(%rip), %r12      # 0x14328
movq 0x8(%r15), %r14
movl $0x10, %edi
callq 0x4a8a
movq %rax, %rbx
movq %r14, %rdi
callq 0x40a0
leal 0x1(%rax), %edi
callq 0x4a8a
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x4070
testq %r12, %r12
je 0x68fc
movq %rbx, 0x8(%r12)
movq %rbx, 0xda25(%rip)      # 0x14328
movq 0xda16(%rip), %rax      # 0x14320
testq %rax, %rax
jne 0x6919
movq %rbx, 0xda0a(%rip)      # 0x14320
movq %rbx, %rax
movq 0x28(%r15), %r15
testq %r15, %r15
je 0x6974
cmpl $0x2, (%r15)
jne 0x6974
movl 0x4(%r15), %ecx
cmpl $0x2c, %ecx
jne 0x694a
movq 0x28(%r15), %r15
cmpl $0x1, (%r15)
movq %rbx, %r12
je 0x68c3
leaq 0x8233(%rip), %rdi      # 0xeb78
callq 0x4a2c
cmpl $0x29, %ecx
jne 0x6974
movq 0x28(%r15), %r15
movq %rax, 0xd9ce(%rip)      # 0x14328
testq %r15, %r15
jne 0x6618
jmp 0x686f
leaq 0x81fb(%rip), %rdi      # 0xeb6a
callq 0x4a2c
leaq 0x8211(%rip), %rdi      # 0xeb8c
callq 0x4a2c
leaq 0x818e(%rip), %rdi      # 0xeb15
callq 0x4a2c
leaq 0x81fd(%rip), %rdi      # 0xeb90
callq 0x4a2c