// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]cproc/attr.c
// Function: parseattr
static bool
parseattr(struct attr *a, enum attrkind allowed, enum attrprefix prefix)
{
	char *name, *prefixname = "";
	enum attrkind kind;
	int paren;

	if (tok.kind != TIDENT)
		return false;
	name = strip(tok.lit);
	next();
	if (!prefix) {
		if (consume(TCOLONCOLON)) {
			if (strcmp(name, "gnu") == 0)
				prefix = PREFIXGNU;
			else
				prefix = 0;
			name = strip(expect(TIDENT, "after attribute prefix"));
		} else {
			prefix = PREFIXNONE;
		}
	}
	kind = 0;
	switch (prefix) {
	case PREFIXGNU:
		prefixname = "GNU ";
		if (strcmp(name, "aligned") == 0) {
			kind = ATTRALIGNED;
			if (consume(TLPAREN)) {
				unsigned long long i;

				i = intconstexpr(&filescope, false);
				if (!i || i & i - 1 || i > INT_MAX)
					error(&tok.loc, "invalid alignment %llu", i);
				if (a)
					a->align = i;
				expect(TRPAREN, "after alignment");
			} else {
				if (a)
					a->align = 16;
			}
		} else if (strcmp(name, "constructor") == 0) {
			kind = ATTRCONSTRUCTOR;
		} else if (strcmp(name, "destructor") == 0) {
			kind = ATTRDESTRUCTOR;
		} else if (strcmp(name, "packed") == 0) {
			kind = ATTRPACKED;
		}
		break;
	}
	if (kind) {
		if (!(kind & allowed))
			error(&tok.loc, "%sattribute '%s' is not supported here", prefixname, name);
		if (a)
			a->kind |= kind;
	} else if (consume(TLPAREN)) {
		/* skip arguments */
		for (paren = 1; paren > 0; next()) {
			switch (tok.kind) {
			case TLPAREN: ++paren; break;
			case TRPAREN: --paren; break;
			}
		}
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x18b9b(%rip), %rbx     # 0x1c108
movl (%rbx), %r13d
cmpl $0x4, %r13d
jne 0x3796
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, %r14
movq 0x20(%rbx), %rdi
callq 0x37ac
movq %rax, %r15
callq 0xa920
cmpl $0x2, %r12d
je 0x35e7
testl %r12d, %r12d
jne 0x363f
movl $0x60, %edi
callq 0xb00a
testb %al, %al
je 0x363f
leaq 0xea64(%rip), %rsi      # 0x1201f
movq %r15, %rdi
callq 0x3140
movl %eax, %r12d
leaq 0xea56(%rip), %rsi      # 0x12023
movl $0x4, %edi
callq 0xafeb
movq %rax, %rdi
callq 0x37ac
testl %r12d, %r12d
jne 0x363f
movq %rax, %r15
leaq 0xea51(%rip), %rsi      # 0x1203f
movq %r15, %rdi
callq 0x3140
testl %eax, %eax
je 0x3676
leaq 0xea6d(%rip), %rsi      # 0x1206e
movq %r15, %rdi
callq 0x3140
testl %eax, %eax
je 0x373f
leaq 0xea62(%rip), %rsi      # 0x1207a
movq %r15, %rdi
callq 0x3140
testl %eax, %eax
je 0x375c
leaq 0xea56(%rip), %rsi      # 0x12085
movq %r15, %rdi
callq 0x3140
testl %eax, %eax
je 0x3764
movl $0x42, %edi
callq 0xb00a
testb %al, %al
je 0x3796
movl $0x1, %ebp
movl (%rbx), %eax
cmpl $0x43, %eax
je 0x3666
cmpl $0x42, %eax
jne 0x3668
incl %ebp
jmp 0x3668
decl %ebp
callq 0xa920
testl %ebp, %ebp
jg 0x3656
jmp 0x3796
movl $0x42, %edi
callq 0xb00a
testb %al, %al
je 0x3747
leaq 0x18a11(%rip), %rdi     # 0x1c0a0
xorl %esi, %esi
callq 0x7359
movq %rax, %r12
testq %rax, %rax
je 0x3708
cmpq $0x7fffffff, %r12       # imm = 0x7FFFFFFF
ja 0x3708
movq %r12, %rax
shrq %rax
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
andq %rax, %rcx
movq %r12, %rax
subq %rcx, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
movq %rax, %rdx
andq %rcx, %rdx
shrq $0x2, %rax
andq %rcx, %rax
addq %rdx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rax, %rcx
movabsq $0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rax, %rcx
shrq $0x38, %rcx
cmpl $0x2, %ecx
jb 0x371d
leaq 0x8(%rbx), %rdi
leaq 0xe934(%rip), %rsi      # 0x12047
movq %r12, %rdx
xorl %eax, %eax
callq 0xd55c
testq %r14, %r14
je 0x3726
movl %r12d, 0x4(%r14)
leaq 0xe931(%rip), %rsi      # 0x1205e
movl $0x43, %edi
callq 0xafeb
movl $0x1, %r12d
jmp 0x376a
movl $0x2, %r12d
jmp 0x376a
movl $0x1, %r12d
testq %r14, %r14
je 0x376a
movl $0x10, 0x4(%r14)
jmp 0x376a
movl $0x4, %r12d
jmp 0x376a
movl $0x8, %r12d
testl %ebp, %r12d
jne 0x378e
addq $0x8, %rbx
leaq 0xe912(%rip), %rsi      # 0x1208c
leaq 0xe8b9(%rip), %rdx      # 0x1203a
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0xd55c
testq %r14, %r14
je 0x3796
orl %r12d, (%r14)
cmpl $0x4, %r13d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq