// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpq $0x0, 0xecaa(%rip)      # 0x16418
je 0x7944
movq 0xecad(%rip), %rcx      # 0x16428
movq 0xec96(%rip), %rax      # 0x16418
movq %rcx, 0x18(%rax)
movq 0xeca3(%rip), %rcx      # 0x16430
movq 0xec84(%rip), %rax      # 0x16418
movq %rcx, 0x20(%rax)
movq 0xec79(%rip), %rax      # 0x16418
movq 0x28(%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x77eb
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq 0xec5c(%rip), %rax      # 0x16418
movq (%rax), %rsi
callq 0x4100
cmpl $0x0, %eax
jne 0x77db
movq -0x8(%rbp), %rdi
movq 0xec44(%rip), %rsi      # 0x16418
callq 0x79d0
jmp 0x77eb
jmp 0x77dd
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x77a7
cmpl $0x0, 0xd7a2(%rip)      # 0x14f94
je 0x7942
cmpq $0x0, 0xec28(%rip)      # 0x16428
je 0x7818
movl $0x13, %edi
movl $0x7, %esi
leaq 0x958a(%rip), %rdx      # 0x10d9d
callq 0xca50
cmpl $0x0, 0xd775(%rip)      # 0x14f94
je 0x782d
movq 0xec08(%rip), %rdi      # 0x16430
callq 0x7b00
movq 0xebfc(%rip), %rax      # 0x16430
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x78c8
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x78b5
movq -0x10(%rbp), %rax
cmpl $0x23, 0x4(%rax)
jne 0x78b5
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x78aa
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x2, (%rax)
jne 0x78aa
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x23, 0x4(%rax)
jne 0x78aa
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x78a8
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x78b3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x78b5
jmp 0x78b7
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x7838
cmpl $0x1, -0x14(%rbp)
jle 0x78e6
movl $0x13, %edi
movl $0xc, %esi
leaq 0x94df(%rip), %rdx      # 0x10dbe
callq 0xca50
jmp 0x7904
cmpl $0x0, -0x14(%rbp)
jle 0x7902
movl $0x13, %edi
movl $0xd, %esi
leaq 0x94cf(%rip), %rdx      # 0x10dcc
callq 0xca50
jmp 0x7904
cmpl $0x1, -0x18(%rbp)
jle 0x7922
movl $0x13, %edi
movl $0xc, %esi
leaq 0x94bc(%rip), %rdx      # 0x10dd7
callq 0xca50
jmp 0x7940
cmpl $0x0, -0x18(%rbp)
jle 0x793e
movl $0x13, %edi
movl $0xd, %esi
leaq 0x94ac(%rip), %rdx      # 0x10de5
callq 0xca50
jmp 0x7940
jmp 0x7942
jmp 0x7944
movq $0x0, 0xead9(%rip) # 0x16428
movq $0x0, 0xead6(%rip) # 0x16430
addq $0x20, %rsp
popq %rbp
retq