// File: /workspace/github_c_makefile_star2_O1/MaoKo[P]FGFX/fgfp/src/cfg.c
// Function: cfg_precedence_list
int
cfg_precedence_list(cfg_t* cfg) {
	size_t prec_depth = NOT_PREC + 1;
	while (1) {
		if (peek_token(cfg->lex) == T_RBRACE)
			{ return (DONE); }
		int kind_prec = advance_token(cfg->lex);
		switch (kind_prec) {
			case T_LEFT: case T_RIGHT: case T_NONASSOC: break;
			default: errorf(CURRENT_LINE(cfg->lex),
						"Bad associativity in the $PRECEDENCE section.");
					return (ERROR);
		}
		if (advance_token(cfg->lex) == T_LPAREN) {
			if (cfg_precedence_atom(cfg, kind_prec, prec_depth++) == ERROR)
				{ return (ERROR); }
			if (peek_token(cfg->lex) == T_COMMA)
				{ advance_token(cfg->lex); }
		}
		else {
			errorf(CURRENT_LINE(cfg->lex),
						"Missing an open paren in the $PRECEDENCE section.");
			return (ERROR);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x5541(%rip), %r12      # 0xa55a
xorl %r15d, %r15d
movq 0x20(%r14), %rdi
callq 0x3974
cmpl $0x33, %eax
je 0x5209
movq 0x20(%r14), %rdi
callq 0x32da
movq %rax, %rbx
addl $-0x6c, %eax
movq 0x20(%r14), %rdi
cmpl $0x3, %eax
jae 0x5193
callq 0x32da
cmpq $0x34, %rax
jne 0x519e
leaq 0x1(%r15), %rax
movq %rax, -0x30(%rbp)
movq 0x20(%r14), %rdi
callq 0x3974
cmpl $0x2d, %eax
je 0x5078
cmpl $0x28, %eax
jne 0x51c0
movslq %ebx, %r12
movslq %eax, %rbx
cmpq $0x2d, %rbx
je 0x508e
cmpq $0x28, %rbx
jne 0x51da
movq 0x20(%r14), %rdi
callq 0x32da
movq 0x20(%r14), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x4702
movq %rax, %r13
cmpq $0x0, 0x20(%rax)
je 0x50d8
movq 0x20(%r14), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r13), %rdx
xorl %r13d, %r13d
leaq 0x5517(%rip), %rsi      # 0xa5e3
xorl %eax, %eax
callq 0x4020
jmp 0x517b
movl $0x8, %edi
callq 0x3b0a
testq %rax, %rax
je 0x5109
movq $0x0, (%rax)
movl %r15d, (%rax)
cmpq $0x6e, %r12
je 0x5114
cmpq $0x6d, %r12
je 0x510e
cmpq $0x6c, %r12
jne 0x511a
movb $0x1, 0x4(%rax)
jmp 0x511a
xorl %r13d, %r13d
jmp 0x517b
movb $0x1, 0x5(%rax)
jmp 0x511a
movw $0x101, 0x4(%rax)       # imm = 0x101
movq %rax, 0x20(%r13)
movq 0x20(%r14), %rdi
callq 0x3974
cmpl $0x31, %eax
je 0x513a
movq 0x20(%r14), %rdi
callq 0x3974
cmpl $0x35, %eax
jne 0x5162
movq 0x20(%r14), %rdi
callq 0x3974
cmpl $0x31, %eax
jne 0x5151
movq 0x20(%r14), %rdi
callq 0x32da
movq 0x20(%r14), %rdi
callq 0x3974
movslq %eax, %rbx
movb $0x1, %r13b
jmp 0x517b
movq 0x20(%r14), %rax
movslq 0x28(%rax), %rdi
xorl %r13d, %r13d
leaq 0x549c(%rip), %rsi      # 0xa610
xorl %eax, %eax
callq 0x4020
testb %r13b, %r13b
jne 0x507e
xorl %ebx, %ebx
movq -0x30(%rbp), %r15
leaq 0x53c9(%rip), %r12      # 0xa55a
jmp 0x51b6
movslq 0x28(%rdi), %rdi
xorl %ebx, %ebx
movq %r12, %rsi
jmp 0x51af
movq 0x20(%r14), %rax
movslq 0x28(%rax), %rdi
xorl %ebx, %ebx
leaq 0x53d9(%rip), %rsi      # 0xa588
xorl %eax, %eax
callq 0x4020
testb %bl, %bl
jne 0x501c
jmp 0x520d
movq 0x20(%r14), %rax
movslq 0x28(%rax), %rdi
xorl %ebx, %ebx
leaq 0x53e9(%rip), %rsi      # 0xa5ba
xorl %eax, %eax
callq 0x4020
jmp 0x5203
movq 0x20(%r14), %rdi
callq 0x32da
movq 0x20(%r14), %rdi
callq 0x3974
movb $0x1, %bl
cmpl $0x31, %eax
leaq 0x5362(%rip), %r12      # 0xa55a
jne 0x5203
movq 0x20(%r14), %rdi
callq 0x32da
movq -0x30(%rbp), %r15
jmp 0x51b6
xorl %eax, %eax
jmp 0x5212
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq