// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]gh_cpp/Src/gh_cpp1.c
// Function: closemacro
static void
closemacro(void)
{	MD *m;
	TS *w;
	int cnt_s = 0, cnt_p = 0;

	if (md)
	{	md->arg = ca;
		md->body = cb;

		for (m = md->nxt; m; m = m->nxt)
			if (strcmp(m->nm, md->nm) == 0)
			{	conflict(m, md);
				break;
			}

		if (misra_rules)
		{	if (ca) m_rule(19, 7, "function-like macro iso function");

			if (misra_rules) check_body_type(cb);

			for (w = cb; w; w = w->nxt)
				if (w->tok == CHAR
				&&  w->val == '#')
				{	if (w->nxt
					&&  w->nxt->tok == CHAR
					&&  w->nxt->val == '#')
					{	cnt_p++;
						w = w->nxt;
						if (w->nxt)
							w = w->nxt;
					} else
						cnt_s++;
				}
			if (cnt_s > 1) m_rule(19, 12, "more than one # in macro");
			else if (cnt_s > 0) m_rule(19, 13, "# in macro");
			if (cnt_p > 1) m_rule(19, 12, "more than one ## in macro");
			else if (cnt_p > 0) m_rule(19, 13, "## in macro");
		}
	}
	ca = (ARGS *) 0;
	cb = (TS *) 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xcdeb(%rip), %r15      # 0x13318
testq %r15, %r15
je 0x689a
movq 0xcdeb(%rip), %rax      # 0x13328
movq %rax, 0x18(%r15)
movq 0xcde8(%rip), %r12      # 0x13330
movq %r12, 0x20(%r15)
movq %r15, %r14
movq 0x28(%r14), %r14
testq %r14, %r14
je 0x65cf
movq (%r14), %rbx
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x4140
testl %eax, %eax
jne 0x654f
leaq 0x20(%r14), %r13
movq (%r13), %r13
testq %r13, %r13
je 0x65c4
testq %r12, %r12
je 0x65c4
movl (%r13), %eax
cmpl (%r12), %eax
jne 0x674b
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x65aa
movq 0x8(%r12), %rsi
testq %rsi, %rsi
je 0x65aa
callq 0x4140
testl %eax, %eax
jne 0x674b
movl 0x4(%r13), %eax
cmpl 0x4(%r12), %eax
jne 0x674b
addq $0x28, %r13
movq 0x28(%r12), %r12
jmp 0x656e
movq 0x28(%r15), %rax
movq %rax, 0xcd49(%rip)      # 0x13318
cmpl $0x0, 0xb8be(%rip)      # 0x11e94
je 0x689a
cmpq $0x0, 0xcd44(%rip)      # 0x13328
je 0x6605
leaq 0x75c1(%rip), %rdx      # 0xdbae
pushq $0x13
popq %rdi
pushq $0x7
popq %rsi
callq 0x9bc0
cmpl $0x0, 0xb895(%rip)      # 0x11e94
je 0x67fd
movq 0xcd24(%rip), %rbx      # 0x13330
testq %rbx, %rbx
je 0x67fd
xorl %edx, %edx
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
xorl %ecx, %ecx
testq %rdi, %rdi
je 0x666a
movq %rdi, %rdx
cmpl $0x2, (%rdi)
jne 0x6664
movl 0x4(%rdx), %edi
cmpl $0x7d, %edi
je 0x6662
cmpl $0x29, %edi
je 0x665e
cmpl $0x5b, %edi
je 0x6652
cmpl $0x5d, %edi
je 0x665a
cmpl $0x7b, %edi
je 0x6656
cmpl $0x28, %edi
jne 0x6664
incl %esi
jmp 0x6664
incl %ecx
jmp 0x6664
incl %eax
jmp 0x6664
decl %ecx
jmp 0x6664
decl %esi
jmp 0x6664
decl %eax
movq 0x28(%rdx), %rdi
jmp 0x6620
movq %rdx, %r14
testl %esi, %esi
jne 0x6679
testl %ecx, %ecx
jne 0x6679
testl %eax, %eax
je 0x668b
leaq 0x75c3(%rip), %rdx      # 0xdc43
pushq $0x13
popq %rdi
pushq $0x28
popq %rsi
callq 0x9bc0
movl (%rbx), %edx
cmpl $0x2, %edx
jne 0x66ac
cmpl $0x3b, 0x4(%rbx)
jne 0x66e1
leaq 0x75cb(%rip), %rdx      # 0xdc6a
pushq $0x13
popq %rdi
pushq $0x4
popq %rsi
callq 0x9bc0
movl (%rbx), %edx
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x66c1
xorl %ecx, %ecx
cmpl $0x2, %edx
je 0x66eb
jmp 0x6794
cmpl $0x1, %edx
je 0x67fd
movb $0x1, %cl
xorl %eax, %eax
cmpl $0x2, %edx
je 0x66eb
cmpl $0x4, %edx
jne 0x6794
jmp 0x67fd
movq 0x28(%rbx), %rax
testq %rax, %rax
sete %cl
movl 0x4(%rbx), %edx
cmpl $0x29, %edx
setne %sil
testq %r14, %r14
sete %dil
orb %sil, %dil
jne 0x671f
movl (%r14), %esi
movb $0x1, %dl
cmpl $0x2, %esi
jne 0x67a2
cmpl $0x28, 0x4(%r14)
jne 0x67d4
jmp 0x67fd
testq %r14, %r14
sete %sil
cmpl $0x7d, %edx
setne %dl
orb %sil, %dl
jne 0x6791
movl (%r14), %esi
movb $0x1, %dl
cmpl $0x2, %esi
jne 0x67a2
cmpl $0x7b, 0x4(%r14)
jne 0x67d4
jmp 0x67fd
movq 0xa8a6(%rip), %r15      # 0x10ff8
movq (%r15), %rdi
movq 0xa9b4(%rip), %rdx      # 0x11110
movl 0xb72e(%rip), %ecx      # 0x11e90
leaq 0x7499(%rip), %rsi      # 0xdc02
movq %rbx, %r8
xorl %eax, %eax
callq 0x4150
movq (%r15), %rdi
movq 0x10(%r14), %rdx
movl 0x8(%r14), %ecx
leaq 0x74a1(%rip), %rsi      # 0xdc26
xorl %eax, %eax
callq 0x4150
jmp 0x65cf
pushq $0x2
popq %rdx
testq %r14, %r14
je 0x67d4
movl (%r14), %esi
cmpl $0x29, %edx
setne %dl
cmpl $0x1, %esi
jne 0x67d4
movq 0x8(%r14), %rsi
cmpb $0x64, (%rsi)
jne 0x67d4
cmpb $0x6f, 0x1(%rsi)
jne 0x67d4
cmpb $0x0, 0x2(%rsi)
setne %sil
orb %dl, %cl
orb %sil, %cl
jne 0x67d4
cmpl $0x4, (%rax)
jne 0x67d4
cmpl $0x0, 0x4(%rax)
je 0x68b9
movq 0xa935(%rip), %rdi      # 0x11110
leaq 0x3a3a(%rip), %rsi      # 0xa21c
callq 0x4140
testl %eax, %eax
je 0x67fd
leaq 0x749e(%rip), %rdx      # 0xdc90
pushq $0x13
popq %rdi
pushq $0x4
popq %rsi
callq 0x9bc0
xorl %eax, %eax
leaq 0xcb2a(%rip), %rcx      # 0x13330
xorl %ebx, %ebx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x6846
cmpl $0x2, (%rcx)
jne 0x6840
cmpl $0x23, 0x4(%rcx)
jne 0x6840
movq 0x28(%rcx), %rdx
testq %rdx, %rdx
je 0x683e
cmpl $0x2, (%rdx)
jne 0x683e
cmpl $0x23, 0x4(%rdx)
jne 0x683e
incl %ebx
movq 0x28(%rdx), %rcx
testq %rcx, %rcx
cmoveq %rdx, %rcx
jmp 0x6840
incl %eax
addq $0x28, %rcx
jmp 0x6808
cmpl $0x2, %eax
jl 0x6859
leaq 0x737d(%rip), %rdx      # 0xdbcf
pushq $0x13
popq %rdi
pushq $0xc
jmp 0x686a
cmpl $0x1, %eax
jne 0x6870
leaq 0x7378(%rip), %rdx      # 0xdbdd
pushq $0x13
popq %rdi
pushq $0xd
popq %rsi
callq 0x9bc0
cmpl $0x2, %ebx
jl 0x6883
leaq 0x736c(%rip), %rdx      # 0xdbe8
pushq $0x13
popq %rdi
pushq $0xc
jmp 0x6894
cmpl $0x1, %ebx
jne 0x689a
leaq 0x7367(%rip), %rdx      # 0xdbf6
pushq $0x13
popq %rdi
pushq $0xd
popq %rsi
callq 0x9bc0
andq $0x0, 0xca86(%rip)      # 0x13328
andq $0x0, 0xca86(%rip)      # 0x13330
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x67d4
cmpl $0x2, (%rax)
jne 0x67d4
cmpl $0x28, 0x4(%rax)
jne 0x67d4
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x67d4
cmpl $0x1, (%rax)
jne 0x67d4
movq 0x8(%rax), %rdi
leaq 0x7390(%rip), %rsi      # 0xdc8a
callq 0x4140
testl %eax, %eax
jne 0x67d4
jmp 0x67fd