// File: /workspace/github_c_makefile_star2_O1/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 0x37ba
movl %edx, %r12d
movq %rdi, %r14
movl %esi, 0x4(%rsp)
movq 0x20(%rbx), %rdi
callq 0x37d0
movq %rax, %r15
callq 0xa9d0
testl %r12d, %r12d
jne 0x35e5
movl $0x60, %edi
callq 0xb099
movl $0x1, %r12d
testb %al, %al
je 0x35e5
leaq 0xea6a(%rip), %rsi      # 0x1201f
movq %r15, %rdi
callq 0x3140
xorl %r12d, %r12d
testl %eax, %eax
sete %r12b
addl %r12d, %r12d
leaq 0xea53(%rip), %rsi      # 0x12023
movl $0x4, %edi
callq 0xb07a
movq %rax, %rdi
callq 0x37d0
movq %rax, %r15
cmpl $0x2, %r12d
jne 0x3655
leaq 0xea4d(%rip), %rsi      # 0x1203f
movq %r15, %rdi
callq 0x3140
testl %eax, %eax
je 0x3665
leaq 0xea69(%rip), %rsi      # 0x1206e
movq %r15, %rdi
callq 0x3140
leaq 0xea26(%rip), %r12      # 0x1203a
testl %eax, %eax
je 0x3734
leaq 0xea57(%rip), %rsi      # 0x1207a
movq %r15, %rdi
callq 0x3140
testl %eax, %eax
je 0x3756
leaq 0xea4b(%rip), %rsi      # 0x12085
movq %r15, %rdi
callq 0x3140
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
setne %al
shll $0x3, %ebp
jmp 0x375d
xorl %ebp, %ebp
movb $0x1, %al
leaq 0x11055(%rip), %r12     # 0x146b5
jmp 0x375d
movl $0x42, %edi
callq 0xb099
testb %al, %al
je 0x373b
leaq 0x18a22(%rip), %rdi     # 0x1c0a0
xorl %esi, %esi
callq 0x74a9
movq %rax, %r12
testq %rax, %rax
je 0x36f7
cmpq $0x7fffffff, %r12       # imm = 0x7FFFFFFF
ja 0x36f7
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 0x370c
leaq 0x8(%rbx), %rdi
leaq 0xe945(%rip), %rsi      # 0x12047
movq %r12, %rdx
xorl %eax, %eax
callq 0xd56a
testq %r14, %r14
je 0x3715
movl %r12d, 0x4(%r14)
leaq 0xe942(%rip), %rsi      # 0x1205e
movl $0x43, %edi
callq 0xb07a
movl $0x1, %ebp
leaq 0xe908(%rip), %r12      # 0x1203a
jmp 0x375b
movl $0x2, %ebp
jmp 0x375b
movl $0x1, %ebp
leaq 0xe8f3(%rip), %r12      # 0x1203a
testq %r14, %r14
je 0x375b
movl $0x10, 0x4(%r14)
jmp 0x375b
movl $0x4, %ebp
xorl %eax, %eax
testb %al, %al
je 0x3791
movl $0x42, %edi
callq 0xb099
testb %al, %al
je 0x37ba
movl $0x1, %ebp
movl (%rbx), %eax
cmpl $0x43, %eax
je 0x3784
cmpl $0x42, %eax
jne 0x3786
incl %ebp
jmp 0x3786
decl %ebp
callq 0xa9d0
testl %ebp, %ebp
jg 0x3774
jmp 0x37ba
testl %ebp, 0x4(%rsp)
jne 0x37b2
addq $0x8, %rbx
leaq 0xe8ea(%rip), %rsi      # 0x1208c
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xd56a
testq %r14, %r14
je 0x37ba
orl %ebp, (%r14)
cmpl $0x4, %r13d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq