// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/ir.c
// Function: check_phi_node
static int check_phi_node(struct instruction *insn)
{
	struct basic_block *par;
	pseudo_t phi;
	int err = 0;

	if (!has_users(insn->target))
		return err;

	if (bb_list_size(insn->bb->parents) != nbr_phi_operands(insn)) {
		sparse_error(insn->pos, "bad number of phi operands in:\n\t%s",
			show_instruction(insn));
		info(insn->pos, "parents: %d", bb_list_size(insn->bb->parents));
		info(insn->pos, "phisrcs: %d", nbr_phi_operands(insn));
		return 1;
	}

	PREPARE_PTR_LIST(insn->bb->parents, par);
	FOR_EACH_PTR(insn->phi_list, phi) {
		struct instruction *src;
		if (phi == VOID)
			continue;
		assert(phi->type == PSEUDO_PHI);
		src = phi->def;
		if (src->bb != par) {
			sparse_error(src->pos, "wrong BB for %s:", show_instruction(src));
			info(src->pos, "expected: %s", show_label(par));
			info(src->pos, "     got: %s", show_label(src->bb));
			err++;
		}
		NEXT_PTR_LIST(par);
	} END_FOR_EACH_PTR(phi);
	FINISH_PTR_LIST(par);
	return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x5d900
cmpl $0x0, %eax
jne 0x5d403
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5d75c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x5d930
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d950
movl %eax, %ecx
movl -0x6c(%rbp), %eax
cmpl %ecx, %eax
je 0x5d4c3
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18200
movq %rax, %rdx
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0xfd1f(%rip), %rsi      # 0x6d175
movb $0x0, %al
callq 0x16f90
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x5d930
movl %eax, %edx
movq -0x80(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0xfd11(%rip), %rsi      # 0x6d198
movb $0x0, %al
callq 0x16c10
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5d950
movl %eax, %edx
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0xfcf4(%rip), %rsi      # 0x6d1a4
movb $0x0, %al
callq 0x16c10
movl $0x1, -0x4(%rbp)
jmp 0x5d75c
jmp 0x5d4c5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5d551
jmp 0x5d4f5
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5d52e
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
andq $-0x4, %rax
movq %rax, -0x18(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5d54f
movq $0x0, -0x18(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq -0x30(%rbp), %rax
jne 0x5d4f5
jmp 0x5d551
jmp 0x5d553
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x5d57b
jmp 0x5d754
jmp 0x5d57d
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x50(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5d73c
movq -0x50(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x50(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5d5cf
cmpq $0x0, -0x20(%rbp)
jne 0x5d5cf
jmp 0x5d72e
leaq 0x2e7da(%rip), %rax     # 0x8bdb0
cmpq %rax, -0x20(%rbp)
jne 0x5d5e1
jmp 0x5d72e
movq -0x20(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0x5d5ed
jmp 0x5d60c
leaq 0xfbbc(%rip), %rdi      # 0x6d1b0
leaq 0xfbcd(%rip), %rsi      # 0x6d1c8
movl $0x30, %edx
leaq 0xfbc6(%rip), %rcx      # 0x6d1cd
callq 0x11120
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x5d6c7
movq -0x68(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x68(%rbp), %rdi
callq 0x18200
movq %rax, %rdx
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0xfba3(%rip), %rsi      # 0x6d1f6
movb $0x0, %al
callq 0x16f90
movq -0x68(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17e00
movq %rax, %rdx
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x78c2(%rip), %rsi      # 0x64f45
movb $0x0, %al
callq 0x16c10
movq -0x68(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x17e00
movq %rax, %rdx
movq -0x90(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x789e(%rip), %rsi      # 0x64f55
movb $0x0, %al
callq 0x16c10
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5d72c
jmp 0x5d6d0
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5d709
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
andq $-0x4, %rax
movq %rax, -0x18(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5d72a
movq $0x0, -0x18(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq -0x30(%rbp), %rax
jne 0x5d6d0
jmp 0x5d72c
jmp 0x5d72e
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x5d584
jmp 0x5d73e
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq -0x48(%rbp), %rax
jne 0x5d57d
jmp 0x5d756
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)