// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq 0x20(%rdi), %rdi
callq 0x387a
xorl %r14d, %r14d
cmpl $0x33, %eax
je 0x504c
xorl %r12d, %r12d
movq 0x20(%rbx), %rdi
callq 0x32ce
movq %rax, %r14
addl $-0x6c, %eax
movq 0x20(%rbx), %rdi
cmpl $0x3, %eax
jae 0x505e
callq 0x32ce
cmpq $0x34, %rax
jne 0x506b
movslq %r14d, %r13
leal 0x1(%r12), %eax
movl %eax, -0x2c(%rbp)
movq 0x20(%rbx), %rdi
callq 0x387a
movl %eax, %r14d
cmpl $0x2d, %eax
je 0x4f07
cmpl $0x28, %r14d
jne 0x507c
cmpl $0x2d, %r14d
je 0x4f17
cmpl $0x28, %r14d
jne 0x4fd7
movq 0x20(%rbx), %rdi
callq 0x32ce
movq 0x20(%rbx), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x459f
movq %rax, %r15
cmpq $0x0, 0x20(%rax)
jne 0x5014
movl $0x8, %edi
callq 0x3a0e
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x504c
movq $0x0, (%rax)
movl %r12d, (%rax)
cmpq $0x6e, %r13
je 0x4f85
cmpq $0x6d, %r13
je 0x4f7f
cmpq $0x6c, %r13
jne 0x4f8b
movb $0x1, 0x4(%rax)
jmp 0x4f8b
movb $0x1, 0x5(%rax)
jmp 0x4f8b
movw $0x101, 0x4(%rax)       # imm = 0x101
movq %rax, 0x20(%r15)
movq 0x20(%rbx), %rdi
callq 0x387a
cmpl $0x31, %eax
je 0x4faf
movq 0x20(%rbx), %rdi
callq 0x387a
cmpl $0x35, %eax
jne 0x5036
movq 0x20(%rbx), %rdi
callq 0x387a
cmpl $0x31, %eax
jne 0x4fc6
movq 0x20(%rbx), %rdi
callq 0x32ce
movq 0x20(%rbx), %rdi
callq 0x387a
movl %eax, %r14d
jmp 0x4f07
movq 0x20(%rbx), %rdi
callq 0x32ce
movq 0x20(%rbx), %rdi
callq 0x387a
cmpl $0x31, %eax
jne 0x4ff7
movq 0x20(%rbx), %rdi
callq 0x32ce
movq 0x20(%rbx), %rdi
callq 0x387a
xorl %r14d, %r14d
movl -0x2c(%rbp), %ecx
movl %ecx, %r12d
cmpl $0x33, %eax
jne 0x4eb6
jmp 0x504c
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
movq 0x10(%r15), %rdx
leaq 0x55a9(%rip), %rsi      # 0xa5d0
xorl %eax, %eax
callq 0x3f24
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x504c
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x55b8(%rip), %rsi      # 0xa5fd
xorl %eax, %eax
callq 0x3f24
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x28(%rdi), %rdi
leaq 0x54de(%rip), %rsi      # 0xa547
jmp 0x508b
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x54fb(%rip), %rsi      # 0xa575
jmp 0x508b
movq 0x20(%rbx), %rax
movslq 0x28(%rax), %rdi
leaq 0x551c(%rip), %rsi      # 0xa5a7
xorl %eax, %eax
callq 0x3f24
jmp 0x502e