// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/flow.c
// Function: try_to_simplify_bb
static int try_to_simplify_bb(struct basic_block *bb, struct instruction *first, struct instruction *second)
{
	int changed = 0;
	pseudo_t phi;
	int bogus;

	/*
	 * This a due to improper dominance tracking during
	 * simplify_symbol_usage()/conversion to SSA form.
	 * No sane simplification can be done when we have this.
	 */
	bogus = !phi_check(first);

	FOR_EACH_PTR(first->phi_list, phi) {
		struct instruction *def = phi->def;
		struct basic_block *source, *target;
		pseudo_t pseudo;
		struct instruction *br;
		int cond;

		if (!def)
			continue;
		source = def->bb;
		pseudo = def->src1;
		if (!pseudo || !source)
			continue;
		br = last_instruction(source->insns);
		if (!br)
			continue;
		if (br->opcode != OP_CBR && br->opcode != OP_BR)
			continue;
		cond = pseudo_truth_value(pseudo);
		if (cond < 0)
			continue;
		target = cond ? second->bb_true : second->bb_false;
		if (bb_depends_on(target, bb))
			continue;
		if (bb_depends_on_phi(target, bb))
			continue;
		changed |= rewrite_branch(source, &br->bb_true, bb, target);
		changed |= rewrite_branch(source, &br->bb_false, bb, target);
		if (changed && !bogus)
			kill_use(THIS_ADDRESS(phi));
	} END_FOR_EACH_PTR(phi);
	return changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5b4b0
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x5b2c9
jmp 0x5b4a3
jmp 0x5b2cb
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x40(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x5b48b
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x5b31d
cmpq $0x0, -0x28(%rbp)
jne 0x5b31d
jmp 0x5b47d
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x5b335
jmp 0x5b47d
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0x5b35b
cmpq $0x0, -0x60(%rbp)
jne 0x5b360
jmp 0x5b47d
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x5a540
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x78(%rbp)
jne 0x5b37d
jmp 0x5b47d
movq -0x78(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x4, %eax
je 0x5b39e
movq -0x78(%rbp), %rax
movl (%rax), %eax
andl $0x7f, %eax
cmpl $0x3, %eax
je 0x5b39e
jmp 0x5b47d
movq -0x70(%rbp), %rdi
callq 0x5b6b0
movl %eax, -0x7c(%rbp)
cmpl $0x0, -0x7c(%rbp)
jge 0x5b3b5
jmp 0x5b47d
cmpl $0x0, -0x7c(%rbp)
je 0x5b3cc
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x5b3db
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x5b730
cmpl $0x0, %eax
je 0x5b3fd
jmp 0x5b47d
movq -0x68(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x5b810
cmpl $0x0, %eax
je 0x5b411
jmp 0x5b47d
movq -0x60(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x30, %rsi
addq $0x8, %rsi
movq -0x8(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x5b910
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x60(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x30, %rsi
addq $0x10, %rsi
movq -0x8(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x5b910
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x5b47b
cmpl $0x0, -0x2c(%rbp)
jne 0x5b47b
movq -0x40(%rbp), %rdi
addq $0x18, %rdi
movslq -0x4c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x35160
jmp 0x5b47d
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x5b2d2
jmp 0x5b48d
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq -0x38(%rbp), %rax
jne 0x5b2cb
movl -0x1c(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nop