// File: /workspace/github_c_makefile_star2_O1/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 0xd660(%rip), %r15      # 0x14318
testq %r15, %r15
je 0x6fbd
movq 0xd660(%rip), %rax      # 0x14328
movq %rax, 0x18(%r15)
movq 0xd65d(%rip), %r12      # 0x14330
movq %r12, 0x20(%r15)
movq %r15, %rbx
movq 0x28(%rbx), %rbx
testq %rbx, %rbx
je 0x6d6b
movq (%rbx), %r14
movq (%r15), %rsi
movq %r14, %rdi
callq 0x4140
testl %eax, %eax
jne 0x6cda
movq 0x20(%rbx), %r13
testq %r13, %r13
setne %al
testq %r12, %r12
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x6d60
movl (%r13), %eax
cmpl (%r12), %eax
jne 0x6fdc
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x6d3e
movq 0x8(%r12), %rsi
testq %rsi, %rsi
je 0x6d3e
callq 0x4140
testl %eax, %eax
jne 0x6fdc
movl 0x4(%r13), %eax
cmpl 0x4(%r12), %eax
jne 0x6fdc
movq 0x28(%r13), %r13
testq %r13, %r13
je 0x6d60
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x6d10
movq 0x28(%r15), %rax
movq %rax, 0xd5ad(%rip)      # 0x14318
cmpl $0x0, 0xc122(%rip)      # 0x12e94
je 0x6fbd
cmpq $0x0, 0xd5a8(%rip)      # 0x14328
je 0x6d98
leaq 0x7e29(%rip), %rdx      # 0xebb2
movl $0x13, %edi
movl $0x7, %esi
callq 0xa250
cmpl $0x0, 0xc0f5(%rip)      # 0x12e94
je 0x6f08
movq 0xd584(%rip), %r14      # 0x14330
testq %r14, %r14
je 0x6f08
xorl %ecx, %ecx
xorl %eax, %eax
xorl %edx, %edx
movq %r14, %rsi
movq %rsi, %rbx
cmpl $0x2, (%rsi)
jne 0x6e02
movl 0x4(%rbx), %esi
cmpl $0x5c, %esi
jg 0x6de1
cmpl $0x28, %esi
je 0x6df4
cmpl $0x29, %esi
je 0x6dfc
cmpl $0x5b, %esi
jne 0x6e02
incl %ecx
jmp 0x6e02
cmpl $0x5d, %esi
je 0x6df8
cmpl $0x7b, %esi
je 0x6e00
cmpl $0x7d, %esi
jne 0x6e02
decl %eax
jmp 0x6e02
incl %edx
jmp 0x6e02
decl %ecx
jmp 0x6e02
decl %edx
jmp 0x6e02
incl %eax
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
jne 0x6dbe
testl %edx, %edx
jne 0x6e17
testl %ecx, %ecx
jne 0x6e17
testl %eax, %eax
je 0x6e2d
leaq 0x7e29(%rip), %rdx      # 0xec47
movl $0x13, %edi
movl $0x28, %esi
callq 0xa250
cmpl $0x2, (%r14)
jne 0x6e50
cmpl $0x3b, 0x4(%r14)
jne 0x6e50
leaq 0x7e2d(%rip), %rdx      # 0xec6e
movl $0x13, %edi
movl $0x4, %esi
callq 0xa250
movq 0x28(%r14), %r15
testq %r15, %r15
je 0x6ef7
movl (%r14), %r12d
cmpl $0x2, %r12d
jne 0x6e93
movl 0x4(%r14), %eax
cmpl $0x7d, %eax
je 0x6e88
cmpl $0x29, %eax
jne 0x6e93
cmpl $0x2, (%rbx)
jne 0x6e83
cmpl $0x28, 0x4(%rbx)
je 0x6f08
cmpl $0x7d, %eax
jne 0x6e93
cmpl $0x2, (%rbx)
jne 0x6e93
cmpl $0x7b, 0x4(%rbx)
je 0x6f08
cmpl $0x1, (%rbx)
jne 0x6ec8
movq 0x8(%rbx), %rdi
leaq 0x7deb(%rip), %rsi      # 0xec8e
callq 0x4140
testq %r15, %r15
je 0x6ec8
cmpl $0x29, %r12d
jne 0x6ec8
testl %eax, %eax
jne 0x6ec8
cmpl $0x4, (%r15)
jne 0x6ec8
cmpl $0x0, 0x4(%r15)
je 0x6fec
movq 0xb241(%rip), %rdi      # 0x12110
leaq 0x4346(%rip), %rsi      # 0xb21c
callq 0x4140
testl %eax, %eax
je 0x6f08
leaq 0x7db1(%rip), %rdx      # 0xec97
movl $0x13, %edi
movl $0x4, %esi
callq 0xa250
jmp 0x6f08
movl (%r14), %eax
cmpl $0x1, %eax
je 0x6f08
cmpl $0x4, %eax
jne 0x6e5d
movq 0xd421(%rip), %rcx      # 0x14330
testq %rcx, %rcx
je 0x6f53
xorl %ebx, %ebx
xorl %eax, %eax
cmpl $0x2, (%rcx)
jne 0x6f48
cmpl $0x23, 0x4(%rcx)
jne 0x6f48
movq 0x28(%rcx), %rdx
testq %rdx, %rdx
je 0x6f46
cmpl $0x2, (%rdx)
jne 0x6f46
cmpl $0x23, 0x4(%rdx)
jne 0x6f46
incl %ebx
movq 0x28(%rdx), %rcx
testq %rcx, %rcx
cmoveq %rdx, %rcx
jmp 0x6f48
incl %eax
movq 0x28(%rcx), %rcx
testq %rcx, %rcx
jne 0x6f18
jmp 0x6f57
xorl %eax, %eax
xorl %ebx, %ebx
cmpl $0x2, %eax
jl 0x6f6f
leaq 0x7c70(%rip), %rdx      # 0xebd3
movl $0x13, %edi
movl $0xc, %esi
jmp 0x6f85
cmpl $0x1, %eax
jne 0x6f8a
leaq 0x7c66(%rip), %rdx      # 0xebe1
movl $0x13, %edi
movl $0xd, %esi
callq 0xa250
cmpl $0x2, %ebx
jl 0x6fa2
leaq 0x7c56(%rip), %rdx      # 0xebec
movl $0x13, %edi
movl $0xc, %esi
jmp 0x6fb8
cmpl $0x1, %ebx
jne 0x6fbd
leaq 0x7c4c(%rip), %rdx      # 0xebfa
movl $0x13, %edi
movl $0xd, %esi
callq 0xa250
xorl %eax, %eax
movq %rax, 0xd362(%rip)      # 0x14328
movq %rax, 0xd363(%rip)      # 0x14330
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x445b
jmp 0x6d6b
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x6ec8
cmpl $0x2, (%rax)
jne 0x6ec8
cmpl $0x28, 0x4(%rax)
jne 0x6ec8
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x6ec8
cmpl $0x1, (%rax)
jne 0x6ec8
movq 0x8(%rax), %rdi
leaq 0x7c64(%rip), %rsi      # 0xec91
callq 0x4140
testl %eax, %eax
jne 0x6ec8
jmp 0x6f08