// File: /workspace/github_c_makefile_star2_O1/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 0x6995
movq %rdi, %rbx
cmpl $0x0, 0xc8cd(%rip)      # 0x12e94
je 0x65e8
cmpl $0x0, 0xdd40(%rip)      # 0x14310
jle 0x65e8
leaq 0x855a(%rip), %rdx      # 0xeb33
movl $0x13, %edi
movl $0x5, %esi
callq 0xa250
movq 0x8(%rbx), %rdi
callq 0x6b37
movq 0x28(%rbx), %r15
movq $0x0, 0xdd20(%rip) # 0x14320
testq %r15, %r15
je 0x66e8
cmpl $0x2, (%r15)
jne 0x66eb
cmpl $0x28, 0x4(%r15)
jne 0x66eb
cmpl $0x0, 0x10(%r15)
jne 0x66eb
movq 0x28(%r15), %r15
testq %r15, %r15
je 0x69a1
movl (%r15), %eax
cmpl $0x2, %eax
jne 0x6649
cmpl $0x29, 0x4(%r15)
je 0x6974
cmpl $0x1, %eax
jne 0x66dc
movq 0x8(%r15), %r14
movq 0xdccb(%rip), %r12      # 0x14328
movl $0x10, %edi
callq 0x4afa
movq %rax, %rbx
movq %r14, %rdi
callq 0x40a0
leal 0x1(%rax), %edi
callq 0x4afa
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x4070
testq %r12, %r12
je 0x6692
movq %rbx, 0x8(%r12)
movq %rbx, 0xdc8f(%rip)      # 0x14328
cmpq $0x0, 0xdc7f(%rip)      # 0x14320
jne 0x66aa
movq %rbx, 0xdc76(%rip)      # 0x14320
movq 0x28(%r15), %r15
testq %r15, %r15
je 0x6989
cmpl $0x2, (%r15)
jne 0x6989
movl 0x4(%r15), %eax
cmpl $0x2c, %eax
jne 0x696f
movq 0x28(%r15), %r15
cmpl $0x1, (%r15)
je 0x6652
leaq 0x8499(%rip), %rdi      # 0xeb7c
callq 0x4a9c
xorl %r15d, %r15d
movq 0xdc2e(%rip), %rax      # 0x14320
movq %rax, 0xdc2f(%rip)      # 0x14328
testq %r15, %r15
je 0x6952
xorl %r12d, %r12d
leaq 0x4a04(%rip), %r13      # 0xb110
xorl %ebx, %ebx
movl $0x0, %eax
subl $0x1, %ebx
jb 0x671c
movl 0x10(%r15), %eax
movl %eax, 0xc776(%rip)      # 0x12e98
movl (%r15), %eax
decl %eax
cmpl $0x3, %eax
ja 0x697d
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0x8(%r15), %rdi
callq 0x6bb3
movl %eax, %r14d
xorl %eax, %eax
testl %r14d, %r14d
setns %al
leal 0x1(,%rax,4), %edi
xorl %esi, %esi
callq 0x6c37
movq 0x8(%r15), %rax
movq 0xdbc9(%rip), %rcx      # 0x14330
movq %rax, 0x8(%rcx)
testl %r14d, %r14d
cmovsl %r12d, %r14d
movl %r14d, 0x4(%rcx)
jle 0x689c
cmpl $0x0, 0xc711(%rip)      # 0x12e94
je 0x689c
movq 0x20(%r15), %rcx
testq %rcx, %rcx
je 0x67db
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x67db
cmpl $0x2, (%rcx)
jne 0x67db
movl 0x4(%rcx), %ecx
cmpl $0x28, %ecx
je 0x67ad
cmpl $0x23, %ecx
jne 0x67db
cmpl $0x2, (%rax)
jne 0x67db
movl 0x4(%rax), %ecx
cmpl $0x29, %ecx
je 0x689c
cmpl $0x23, %ecx
jne 0x67db
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x67db
cmpl $0x2, (%rax)
jne 0x67db
cmpl $0x23, 0x4(%rax)
je 0x689c
movl $0x13, %edi
movl $0xa, %esi
leaq 0x8362(%rip), %rdx      # 0xeb4e
callq 0xa250
jmp 0x689c
movl 0x4(%r15), %esi
movl $0x3, %edi
jmp 0x6897
movl 0x4(%r15), %esi
movl $0x4, %edi
jmp 0x6897
movl 0x4(%r15), %esi
cmpl $0x23, %esi
jne 0x6892
movq 0x28(%r15), %r12
testq %r12, %r12
je 0x68b8
movl 0x10(%r15), %eax
movl %eax, 0xc666(%rip)      # 0x12e98
movl (%r12), %eax
decl %eax
cmpl $0x3, %eax
ja 0x697d
leaq 0x48d8(%rip), %rcx      # 0xb120
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r12), %rdi
callq 0x6bb3
movl %eax, %r14d
xorl %edi, %edi
testl %eax, %eax
setns %dil
movl $0x0, %eax
cmovsl %eax, %r14d
xorl $0x7, %edi
xorl %esi, %esi
callq 0x6c37
movq 0x8(%r12), %rax
movq 0xdaab(%rip), %rcx      # 0x14330
movq %rax, 0x8(%rcx)
movl %r14d, 0x4(%rcx)
jmp 0x693c
movl $0x2, %edi
callq 0x6c37
testq %r15, %r15
je 0x68a7
movq 0x28(%r15), %r15
jmp 0x68aa
xorl %r15d, %r15d
testq %r15, %r15
jne 0x670e
jmp 0x6952
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c37
jmp 0x6946
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c37
movl $0x0, 0xc5b6(%rip)      # 0x12e98
movl 0x4(%r12), %esi
movl $0x3, %edi
jmp 0x6937
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c37
movl $0x0, 0xc591(%rip)      # 0x12e98
movl 0x4(%r12), %esi
movl $0x4, %edi
jmp 0x6937
movl $0x2, %edi
movl $0x23, %esi
callq 0x6c37
movl 0x10(%r12), %eax
movl %eax, 0xc56b(%rip)      # 0x12e98
movl 0x4(%r12), %esi
movl $0x2, %edi
callq 0x6c37
movl $0x0, 0xc552(%rip)      # 0x12e98
xorl %r12d, %r12d
movq 0x28(%r15), %r15
jmp 0x689c
movl $0x0, 0xc53c(%rip)      # 0x12e98
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6ca3
cmpl $0x29, %eax
jne 0x6989
movq 0x28(%r15), %r15
jmp 0x66eb
leaq 0x81ea(%rip), %rdi      # 0xeb6e
callq 0x4a9c
leaq 0x8200(%rip), %rdi      # 0xeb90
callq 0x4a9c
leaq 0x817d(%rip), %rdi      # 0xeb19
callq 0x4a9c
leaq 0x81ec(%rip), %rdi      # 0xeb94
callq 0x4a9c